static EntityProperties GetDebugProperties(BulletWorld pWorld, BulletBody pCollisionObject)
{
EntityProperties ent = new EntityProperties();
// 20131224 not used DiscreteDynamicsWorld world = (pWorld as BulletWorldXNA).world;
CollisionObject collisionObject = (pCollisionObject as BulletBodyXNA).rigidBody;
IndexedMatrix transform = collisionObject.GetWorldTransform();
IndexedVector3 LinearVelocity = collisionObject.GetInterpolationLinearVelocity();
IndexedVector3 AngularVelocity = collisionObject.GetInterpolationAngularVelocity();
IndexedQuaternion rotation = transform.GetRotation();
ent.Acceleration = Vector3.Zero;
ent.ID = (uint)collisionObject.GetUserPointer();
ent.Position = new Vector3(transform._origin.X, transform._origin.Y, transform._origin.Z);
ent.Rotation = new Quaternion(rotation.X, rotation.Y, rotation.Z, rotation.W);
ent.Velocity = new Vector3(LinearVelocity.X, LinearVelocity.Y, LinearVelocity.Z);
ent.RotationalVelocity = new Vector3(AngularVelocity.X, AngularVelocity.Y, AngularVelocity.Z);
return ent;
}