Package com.jme3.bullet.objects.infos
Class RigidBodyMotionState
java.lang.Object
com.bulletphysics.linearmath.MotionState
com.jme3.bullet.objects.infos.RigidBodyMotionState
public class RigidBodyMotionState
extends com.bulletphysics.linearmath.MotionState
stores transform info of a PhysicsNode in a threadsafe manner to
 allow multithreaded access from the jme scenegraph and the bullet physics space
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanapplyTransform(Spatial spatial) applies the current transform to the given jme Node if the location has been updated on the physics sidecom.bulletphysics.linearmath.TransformgetWorldTransform(com.bulletphysics.linearmath.Transform t) Called from Bullet when creating the rigid body.booleanvoidsetApplyPhysicsLocal(boolean applyPhysicsLocal) voidsetVehicle(PhysicsVehicle vehicle) voidsetWorldTransform(com.bulletphysics.linearmath.Transform worldTrans) Called from Bullet when the transform of the rigid body changes.
- 
Constructor Details- 
RigidBodyMotionStatepublic RigidBodyMotionState()
 
- 
- 
Method Details- 
getWorldTransformpublic com.bulletphysics.linearmath.Transform getWorldTransform(com.bulletphysics.linearmath.Transform t) Called from Bullet when creating the rigid body.- Specified by:
- getWorldTransformin class- com.bulletphysics.linearmath.MotionState
- Parameters:
- t- caller-provided storage for the Transform
- Returns:
- t
 
- 
setWorldTransformpublic void setWorldTransform(com.bulletphysics.linearmath.Transform worldTrans) Called from Bullet when the transform of the rigid body changes.- Specified by:
- setWorldTransformin class- com.bulletphysics.linearmath.MotionState
- Parameters:
- worldTrans- the new value (not null, unaffected)
 
- 
applyTransformapplies the current transform to the given jme Node if the location has been updated on the physics side- Parameters:
- spatial- where to apply the physics transform (not null, modified)
- Returns:
- true if changed
 
- 
getWorldLocation- Returns:
- the worldLocation
 
- 
getWorldRotation- Returns:
- the worldRotation
 
- 
getWorldRotationQuat- Returns:
- the worldRotationQuat
 
- 
setVehicle- Parameters:
- vehicle- the vehicle to set
 
- 
isApplyPhysicsLocalpublic boolean isApplyPhysicsLocal()
- 
setApplyPhysicsLocalpublic void setApplyPhysicsLocal(boolean applyPhysicsLocal) 
 
-