public override void Setup() { base.Setup(); INTERACTION_SPHERE_DESCRIPTION sphere = new INTERACTION_SPHERE_DESCRIPTION(); sphere.shape.type = ShapeType.Sphere; sphere.radius = 1.0f; IntPtr spherePtr = StructAllocator.AllocateStruct(ref sphere); InteractionC.AddShapeDescription(ref _scene, spherePtr, out _shapeDescriptionHandle); INTERACTION_CREATE_SHAPE_INFO info = new INTERACTION_CREATE_SHAPE_INFO(); info.shapeFlags = ShapeInfoFlags.None; INTERACTION_TRANSFORM transform = new INTERACTION_TRANSFORM(); transform.position = Vector3.zero.ToCVector(); transform.rotation = Quaternion.identity.ToCQuaternion(); transform.wallTime = 0; InteractionC.CreateShapeInstance(ref _scene, ref _shapeDescriptionHandle, ref transform, ref info, out _shapeInstanceHandle); }
private IntPtr allocateSphere(float radius) { INTERACTION_SPHERE_DESCRIPTION sphereDesc = new INTERACTION_SPHERE_DESCRIPTION(); sphereDesc.shape.type = ShapeType.Sphere; sphereDesc.radius = radius; IntPtr spherePtr = StructAllocator.AllocateStruct(ref sphereDesc); return(spherePtr); }
private IntPtr allocateSphere(float radius) { INTERACTION_SPHERE_DESCRIPTION sphereDesc = new INTERACTION_SPHERE_DESCRIPTION(); sphereDesc.shape.type = ShapeType.Sphere; sphereDesc.radius = radius; IntPtr spherePtr = StructAllocator.AllocateStruct(ref sphereDesc); return spherePtr; }
public override void Setup() { base.Setup(); INTERACTION_SPHERE_DESCRIPTION sphere = new INTERACTION_SPHERE_DESCRIPTION(); sphere.shape.type = ShapeType.Sphere; sphere.radius = 1.0f; IntPtr spherePtr = StructAllocator.AllocateStruct(ref sphere); InteractionC.AddShapeDescription(ref _scene, spherePtr, out _shapeDescriptionHandle); INTERACTION_CREATE_SHAPE_INFO info = new INTERACTION_CREATE_SHAPE_INFO(); info.shapeFlags = ShapeInfoFlags.None; INTERACTION_TRANSFORM transform = new INTERACTION_TRANSFORM(); transform.position = Vector3.zero.ToCVector(); transform.rotation = Quaternion.identity.ToCQuaternion(); transform.wallTime = 0; InteractionC.CreateShapeInstance(ref _scene, ref _shapeDescriptionHandle, ref transform, ref info, out _shapeInstanceHandle); }