Skip to content

Commit

Permalink
Merge pull request #4432 from dalexsoto/scnphysicsshapes-backport
Browse files Browse the repository at this point in the history
[scenekit] SCNPhysicsShape's Create should take a SCNMatrix4 array, not SCNVector3 [Backport]
  • Loading branch information
dalexsoto committed Jul 11, 2018
2 parents c429c0a + 4f1f06b commit 4396b08
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/SceneKit/SCNPhysicsShape.cs
Expand Up @@ -17,6 +17,23 @@ namespace SceneKit
{
public partial class SCNPhysicsShape
{
public static SCNPhysicsShape Create (SCNPhysicsShape [] shapes, SCNMatrix4 [] transforms)
{
if (shapes == null)
throw new ArgumentNullException ("shapes");

if (transforms == null)
throw new ArgumentNullException ("transforms");

var t = new NSValue [transforms.Length];
for (var i = 0; i < t.Length; i++)
t [i] = NSValue.FromSCNMatrix4 (transforms [i]);

return Create (shapes, t);
}

#if !XAMCORE_4_0
[Obsolete ("Use the 'Create' method that takes a 'SCNMatrix4 []'.")]
public static SCNPhysicsShape Create (SCNPhysicsShape [] shapes, SCNVector3 [] transforms)
{
if (shapes == null)
Expand All @@ -31,6 +48,7 @@ public static SCNPhysicsShape Create (SCNPhysicsShape [] shapes, SCNVector3 [] t

return Create (shapes, t);
}
#endif

public static SCNPhysicsShape Create (SCNGeometry geometry,
SCNPhysicsShapeType? shapeType = null,
Expand Down

1 comment on commit 4396b08

@xamarin-release-manager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jenkins job (on internal Jenkins) succeeded

Build succeeded
API Diff (from stable)
API Diff (from PR only) (please review changes)
Generator Diff (only version changes)
Test run succeeded

Please sign in to comment.