-
Notifications
You must be signed in to change notification settings - Fork 511
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 for Xcode 9 GM #2681
Changes from 1 commit
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 |
---|---|---|
|
@@ -11,16 +11,19 @@ | |
|
||
using System; | ||
using System.ComponentModel; | ||
using XamCore.AVFoundation; | ||
using XamCore.CoreFoundation; | ||
using XamCore.CoreGraphics; | ||
using XamCore.CoreMedia; | ||
using XamCore.CoreVideo; | ||
using XamCore.Foundation; | ||
using XamCore.ObjCRuntime; | ||
using XamCore.Metal; | ||
using XamCore.SpriteKit; | ||
using XamCore.SceneKit; | ||
using XamCore.UIKit; | ||
|
||
using Vector2 = global::OpenTK.Vector2; | ||
using Vector3 = global::OpenTK.NVector3; | ||
using Matrix3 = global::OpenTK.NMatrix3; | ||
using Matrix4 = global::OpenTK.NMatrix4; | ||
|
@@ -187,6 +190,12 @@ interface ARFrame : NSCopying { | |
[Export ("capturedImage")] | ||
CVPixelBuffer CapturedImage { get; } | ||
|
||
[NullAllowed, Export ("capturedDepthData", ArgumentSemantic.Strong)] | ||
AVDepthData CapturedDepthData { get; } | ||
|
||
[Export ("capturedDepthDataTimestamp")] | ||
double CapturedDepthDataTimestamp { get; } | ||
|
||
[Export ("camera", ArgumentSemantic.Copy)] | ||
ARCamera Camera { get; } | ||
|
||
|
@@ -509,6 +518,106 @@ interface ARSCNDebugOptions { | |
[Field ("ARSCNDebugOptionShowFeaturePoints")] | ||
SCNDebugOptions ShowFeaturePoints { get; } | ||
} | ||
|
||
[iOS (11,0)] | ||
[NoWatch, NoTV, NoMac] | ||
[Protocol] | ||
interface ARTrackable { | ||
[Abstract] | ||
[Export ("isTracked")] | ||
bool IsTracked { get; } | ||
} | ||
|
||
[iOS (11,0)] | ||
[NoWatch, NoTV, NoMac] | ||
[BaseType (typeof(ARConfiguration))] | ||
interface ARFaceTrackingConfiguration {} | ||
|
||
[iOS (11,0)] | ||
[NoWatch, NoTV, NoMac] | ||
[BaseType (typeof(ARAnchor))] | ||
interface ARFaceAnchor : ARTrackable { | ||
[Export ("geometry")] | ||
ARFaceGeometry Geometry { get; } | ||
|
||
/* Will come in next PR | ||
// @property (readonly, nonatomic) NSDictionary<ARBlendShapeLocation,NSNumber *> * _Nonnull blendShapes; | ||
[Export ("blendShapes")] | ||
NSDictionary<NSString, NSNumber> BlendShapes { get; } | ||
*/ | ||
} | ||
|
||
[iOS (11,0)] | ||
[NoWatch, NoTV, NoMac] | ||
[BaseType (typeof(NSObject))] | ||
[DisableDefaultCtor] | ||
interface ARFaceGeometry : NSCopying { | ||
/* Will come in next PR | ||
[Export ("initWithBlendShapes:")] | ||
IntPtr Constructor (NSDictionary<NSString, NSNumber> blendShapes); | ||
*/ | ||
|
||
[Export ("vertexCount")] | ||
nuint VertexCount { get; } | ||
|
||
// @property (readonly, nonatomic) const vector_float3 * _Nonnull vertices; | ||
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. This comment can be removed. 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. Yup missed. I'll remove in next PR. 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. @rolfbjarne that's minor though, not PR blocking, I'll fix in next PR. |
||
[Export ("vertices")] | ||
Vector3 Vertices { | ||
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] | ||
get; | ||
} | ||
|
||
[Export ("textureCoordinateCount")] | ||
nuint TextureCoordinateCount { get; } | ||
|
||
[Export ("textureCoordinates")] | ||
Vector2 TextureCoordinates { | ||
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] | ||
get; | ||
} | ||
|
||
[Export ("triangleCount")] | ||
nuint TriangleCount { get; } | ||
|
||
[Export ("triangleIndices")] | ||
short TriangleIndices { get; } | ||
} | ||
|
||
[iOS (11,0)] | ||
[NoWatch, NoTV, NoMac] | ||
[BaseType (typeof(SCNGeometry))] | ||
[DisableDefaultCtor] | ||
interface ARSCNFaceGeometry { | ||
[Static] | ||
[Export ("faceGeometryWithDevice:")] | ||
[return: NullAllowed] | ||
ARSCNFaceGeometry CreateFaceGeometry (IMTLDevice device); | ||
|
||
[Static] | ||
[Export ("faceGeometryWithDevice:fillMesh:")] | ||
[return: NullAllowed] | ||
ARSCNFaceGeometry CreateFaceGeometry (IMTLDevice device, bool fillMesh); | ||
|
||
[Export ("updateFromFaceGeometry:")] | ||
void Update (ARFaceGeometry faceGeometry); | ||
} | ||
|
||
[iOS (11,0)] | ||
[NoWatch, NoTV, NoMac] | ||
[BaseType (typeof(ARLightEstimate))] | ||
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. base type has a 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. You're right |
||
interface ARDirectionalLightEstimate { | ||
[Export ("sphericalHarmonicsCoefficients", ArgumentSemantic.Copy)] | ||
NSData SphericalHarmonicsCoefficients { get; } | ||
|
||
[Export ("primaryLightDirection")] | ||
Vector3 PrimaryLightDirection { | ||
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] | ||
get; | ||
} | ||
|
||
[Export ("primaryLightIntensity")] | ||
nfloat PrimaryLightIntensity { get; } | ||
} | ||
} | ||
|
||
#endif // XAMCORE_2_0 |
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.
there's a
[DisableDefaultCtor]
on the base typebut in this case it might be valid but...
The abstract base class for AR session configurations. https://developer.apple.com/documentation/arkit/arconfiguration
so there's an
[Abstract]
missing fromARConfiguration
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.
ARConfiguration
should indeed be[Abstract]
and[DisableDefaultCtor]
is right here (: