Universe.Physics.BulletSPlugin.BSAPIXNA.CreateBodyWithDefaultMotionState C# (CSharp) Method

CreateBodyWithDefaultMotionState() public method

public CreateBodyWithDefaultMotionState ( BulletShape pShape, uint pLocalID, System.Vector3 pRawPosition, Quaternion pRawOrientation ) : BulletBody
pShape BulletShape
pLocalID uint
pRawPosition System.Vector3
pRawOrientation Quaternion
return BulletBody
        public override BulletBody CreateBodyWithDefaultMotionState(BulletShape pShape, uint pLocalID,
            Vector3 pRawPosition, Quaternion pRawOrientation)
        {
            IndexedMatrix mat =
                IndexedMatrix.CreateFromQuaternion(new IndexedQuaternion(pRawOrientation.X, pRawOrientation.Y,
                    pRawOrientation.Z, pRawOrientation.W));
            mat._origin = new IndexedVector3(pRawPosition.X, pRawPosition.Y, pRawPosition.Z);

            CollisionShape shape = (pShape as BulletShapeXNA).shape;

            // TODO: Feed Update array into null
            RigidBody body = new RigidBody(0, new DefaultMotionState(mat, IndexedMatrix.Identity), shape,
                IndexedVector3.Zero);
            body.SetWorldTransform(mat);
            body.SetUserPointer(pLocalID);
            return new BulletBodyXNA(pLocalID, body);
        }
BSAPIXNA