[scenekit] SCNPhysicsShape's Create should take a SCNMatrix4 array, not SCNVector3 (#4040)

- Fixes #4030: SCNPhysicsShape.Create transforms param is bound incorrectly
(https://github.com/xamarin/xamarin-macios/issues/4030)
This commit is contained in:
Vincent Dondain 2018-05-07 16:12:40 -04:00 коммит произвёл Alex Soto
Родитель c429c0a17b
Коммит f6db21262c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: E1DEAE5773ADA456
1 изменённых файлов: 18 добавлений и 0 удалений

Просмотреть файл

@ -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)
@ -31,6 +48,7 @@ namespace SceneKit
return Create (shapes, t);
}
#endif
public static SCNPhysicsShape Create (SCNGeometry geometry,
SCNPhysicsShapeType? shapeType = null,