New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ARKit] Update framework to Xcode 12 beta 5. #9402
Changes from 1 commit
ee3777e
abe90c0
84150d7
d5e8134
f62fefc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System; | ||
using System.ComponentModel; | ||
using System.Runtime.InteropServices; | ||
|
||
using Foundation; | ||
using ObjCRuntime; | ||
|
||
namespace ARKit { | ||
public partial class ARSkeleton { | ||
|
||
[iOS (14,0)] | ||
[DllImport (Constants.ARKitLibrary)] | ||
static extern IntPtr /* NSString */ ARSkeletonJointNameForRecognizedPointKey (/* NSString */ IntPtr recognizedPointKey); | ||
|
||
[EditorBrowsable (EditorBrowsableState.Advanced)] | ||
mandel-macaque marked this conversation as resolved.
Show resolved
Hide resolved
|
||
[iOS (14,0)] | ||
public static NSString CreateJointName (NSString recognizedPointKey) { | ||
spouliot marked this conversation as resolved.
Show resolved
Hide resolved
mandel-macaque marked this conversation as resolved.
Show resolved
Hide resolved
|
||
if (recognizedPointKey == null) | ||
throw new ArgumentNullException (nameof (recognizedPointKey)); | ||
var newNamePtr = ARSkeletonJointNameForRecognizedPointKey (recognizedPointKey.Handle); | ||
return (newNamePtr == IntPtr.Zero) ? null : new NSString (newNamePtr); | ||
mandel-macaque marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -196,7 +196,7 @@ public enum ARFrameSemantics : long { | |
PersonSegmentationWithDepth = (1 << 1) | (1 << 0), | ||
BodyDetection = 1 << 2, | ||
[iOS (14,0)] | ||
SceneDepth = (1 << 3), | ||
SceneDepth = (1 << 4), | ||
} | ||
|
||
[iOS (13,0)] | ||
|
@@ -475,6 +475,11 @@ interface ARFrame : NSCopying { | |
[iOS (14, 0)] | ||
[NullAllowed, Export ("sceneDepth", ArgumentSemantic.Strong)] | ||
ARDepthData SceneDepth { get; } | ||
|
||
[iOS (14, 0)] | ||
[NullAllowed] | ||
[Export ("smoothedSceneDepth", ArgumentSemantic.Strong)] | ||
ARDepthData SmoothedSceneDepth { get; } | ||
} | ||
|
||
[iOS (11,0)] | ||
|
@@ -1986,13 +1991,21 @@ interface ARSkeleton3D { | |
[Protected, Export ("jointLocalTransforms")] | ||
IntPtr RawJointLocalTransforms { get; } | ||
|
||
[EditorBrowsable (EditorBrowsableState.Advanced)] | ||
[Export ("modelTransformForJointName:")] | ||
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] | ||
Matrix4 GetModelTransform ([BindAs (typeof (ARSkeletonJointName))] NSString jointName); | ||
Matrix4 GetModelTransform (NSString jointName); | ||
|
||
[Wrap ("GetModelTransform (jointName.GetConstant()!)")] | ||
Matrix4 GetModelTransform (ARSkeletonJointName jointName); | ||
spouliot marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[EditorBrowsable (EditorBrowsableState.Advanced)] | ||
[Export ("localTransformForJointName:")] | ||
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] | ||
Matrix4 GetLocalTransform ([BindAs (typeof (ARSkeletonJointName))] NSString jointName); | ||
Matrix4 GetLocalTransform (NSString jointName); | ||
|
||
[Wrap ("GetLocalTransform (jointName.GetConstant()!)")] | ||
Matrix4 GetLocalTransform (ARSkeletonJointName jointName); | ||
spouliot marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
[iOS (13,0)] | ||
|
@@ -2004,9 +2017,13 @@ interface ARSkeleton2D { | |
[Protected, Export ("jointLandmarks")] | ||
IntPtr RawJointLandmarks { get; } | ||
|
||
[EditorBrowsable (EditorBrowsableState.Advanced)] | ||
[Export ("landmarkForJointNamed:")] | ||
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] | ||
Vector2 GetLandmarkPoint ([BindAs (typeof (ARSkeletonJointName))] NSString jointName); | ||
Vector2 GetLandmarkPoint (NSString jointName); | ||
|
||
[Wrap ("GetLandmarkPoint (jointName.GetConstant()!)")] | ||
Vector2 GetLandmarkPoint (ARSkeletonJointName jointName); | ||
spouliot marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
[iOS (13,0)] | ||
|
@@ -2034,8 +2051,12 @@ interface ARSkeletonDefinition { | |
[NullAllowed, Export ("neutralBodySkeleton3D")] | ||
ARSkeleton3D NeutralBodySkeleton3D { get; } | ||
|
||
[EditorBrowsable (EditorBrowsableState.Advanced)] | ||
[Export ("indexForJointName:")] | ||
nuint GetJointIndex ([BindAs (typeof (ARSkeletonJointName))] NSString jointName); | ||
nuint GetJointIndex (NSString? jointName); | ||
|
||
[Wrap ("GetJointIndex (jointName.GetConstant()!)")] | ||
nuint GetJointIndex (ARSkeletonJointName jointName); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what was the reason to remove There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because the new added C API allows to create new ARSkeletonJointName which are a typedef based on NSString, if we hide it then the new API makes so sense. The new binding exposes the NSString option as an advance option and then adds the wrap for our smart enum. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. make sense, copy/paste that into the commit message before merging :) |
||
} | ||
|
||
[iOS (13,0)] | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,24 @@ | ||||||
#if __IOS__ | ||||||
|
||||||
using System; | ||||||
using System.Runtime.InteropServices; | ||||||
using System.Threading.Tasks; | ||||||
using ARKit; | ||||||
using Foundation; | ||||||
using NUnit.Framework; | ||||||
using ObjCRuntime; | ||||||
|
||||||
namespace monotouchtest.ARKit { | ||||||
[TestFixture] | ||||||
[Preserve (AllMembers = true)] | ||||||
public class ARSkeletonTest { | ||||||
[Test] | ||||||
public void UnknonwPointTest () | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. minor: typo There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
mandel-macaque marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
{ | ||||||
using (var notKnownPoint = new NSString ("nariz")) | ||||||
Assert.IsNull (ARSkeleton.CreateJointName (notKnownPoint)); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can't add the success until visio is done, tracked here: #9420 |
||||||
} | ||||||
|
||||||
} | ||||||
} | ||||||
#endif |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the normal alternative ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the enum from Visio or use the smart enum ARSkeletonJointName rather than create one from the key
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get that :-) but I mean what's the method/API alternative that the IDE won't try to hide from the developer ?
We normally use
Advanced
because there's a simpler/nicer alternative that we want developers to use (over the more complex one).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need visio for that, I have create issue #9432