Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/SceneKit/SCNPhysicsShape.cs
Original file line number Diff line number Diff line change
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