Skip to content

Commit

Permalink
[arkit] Update for beta 4 (#2370)
Browse files Browse the repository at this point in the history
  • Loading branch information
spouliot authored Jul 25, 2017
1 parent 7051db8 commit 9d8f53e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
12 changes: 12 additions & 0 deletions runtime/bindings-generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1915,6 +1915,18 @@ static IEnumerable<FunctionData> GetFunctionData ()
}
);

data.Add (
new FunctionData {
Comment = " // Matrix4 func (/* UIInterfaceOrientation */ nint)",
Prefix = "simd__",
Variants = Variants.All,
ReturnType = Types.Matrix4f,
Parameters = new ParameterData[] {
new ParameterData { TypeData = Types.NInt },
},
}
);

// We must expand functions with native types to their actual type as well.
for (int i = data.Count - 1; i >= 0; i--) {
if (!data [i].HasNativeType)
Expand Down
11 changes: 9 additions & 2 deletions src/arkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ Matrix4 ProjectionMatrix {
[Export ("projectionMatrixWithViewportSize:orientation:zNear:zFar:")]
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
Matrix4 GetProjectionMatrix (CGSize viewportSize, UIInterfaceOrientation orientation, nfloat zNear, nfloat zFar);

[Export ("viewMatrixForOrientation:")]
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
Matrix4 GetViewMatrix (UIInterfaceOrientation orientation);
}

[iOS (11,0)]
Expand All @@ -183,10 +187,10 @@ interface ARFrame : NSCopying {
[Export ("anchors", ArgumentSemantic.Copy)]
ARAnchor[] Anchors { get; }

[NullAllowed, Export ("lightEstimate", ArgumentSemantic.Copy)]
[NullAllowed, Export ("lightEstimate", ArgumentSemantic.Strong)]
ARLightEstimate LightEstimate { get; }

[NullAllowed, Export ("rawFeaturePoints")]
[NullAllowed, Export ("rawFeaturePoints", ArgumentSemantic.Strong)]
ARPointCloud RawFeaturePoints { get; }

[Export ("hitTest:types:")]
Expand Down Expand Up @@ -232,6 +236,9 @@ interface ARLightEstimate {

[Export ("ambientIntensity")]
nfloat AmbientIntensity { get; }

[Export ("ambientColorTemperature")]
nfloat AmbientColorTemperature { get; }
}

[iOS (11,0)]
Expand Down

0 comments on commit 9d8f53e

Please sign in to comment.