public class RigidBodyMotionState
extends java.lang.Object
Constructor and Description |
---|
RigidBodyMotionState()
Instantiate a motion state.
|
Modifier and Type | Method and Description |
---|---|
boolean |
applyTransform(Spatial spatial)
If the motion state has been updated, apply the new transform to the
specified spatial.
|
protected void |
finalize()
Finalize this motion state just before it is destroyed.
|
long |
getObjectId()
Read the unique id of the native object.
|
Vector3f |
getWorldLocation()
Copy the location from this motion state.
|
Matrix3f |
getWorldRotation()
Read the rotation of this motion state (as a matrix).
|
Quaternion |
getWorldRotationQuat()
Read the rotation of this motion state (as a quaternion).
|
boolean |
isApplyPhysicsLocal()
Test whether physics-space coordinates should match the spatial's local
coordinates.
|
void |
setApplyPhysicsLocal(boolean applyPhysicsLocal)
Alter whether physics-space coordinates should match the spatial's local
coordinates.
|
void |
setVehicle(PhysicsVehicle vehicle) |
public boolean applyTransform(Spatial spatial)
spatial
- where to apply the physics transform (not null, modified)public Vector3f getWorldLocation()
public Matrix3f getWorldRotation()
public Quaternion getWorldRotationQuat()
public void setVehicle(PhysicsVehicle vehicle)
vehicle
- which vehicle will use this motion statepublic boolean isApplyPhysicsLocal()
public void setApplyPhysicsLocal(boolean applyPhysicsLocal)
applyPhysicsLocal
- true→match local coordinates,
false→match world coordinates (default=false)public long getObjectId()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- ignored by the garbage collector