Package com.jme3.bullet.debug
Class AbstractPhysicsDebugControl
java.lang.Object
com.jme3.scene.control.AbstractControl
com.jme3.bullet.debug.AbstractPhysicsDebugControl
- All Implemented Interfaces:
Savable
,Control
,JmeCloneable
,Cloneable
- Direct Known Subclasses:
BulletCharacterDebugControl
,BulletGhostObjectDebugControl
,BulletJointDebugControl
,BulletRigidBodyDebugControl
,BulletVehicleDebugControl
The abstract base class for physics-debug controls (such as
BulletRigidBodyDebugControl) used to visualize individual collision objects
and joints.
This class is shared between JBullet and Native Bullet.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final BulletDebugAppState
the app state that this control servesFields inherited from class com.jme3.scene.control.AbstractControl
enabled, spatial
-
Constructor Summary
ConstructorDescriptionAbstractPhysicsDebugControl
(BulletDebugAppState debugAppState) Instantiate an enabled control to serve the specified debug app state. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
applyPhysicsTransform
(Vector3f worldLocation, Quaternion worldRotation) Apply the specified location and orientation to the controlled spatial.protected void
applyPhysicsTransform
(Vector3f worldLocation, Quaternion worldRotation, Spatial spatial) Apply the specified location and orientation to the specified spatial.protected abstract void
controlUpdate
(float tpf) This is called on the physics thread for debug controlsMethods inherited from class com.jme3.scene.control.AbstractControl
cloneFields, cloneForSpatial, controlRender, getSpatial, isEnabled, jmeClone, read, render, setEnabled, setSpatial, update, write
-
Field Details
-
debugAppState
the app state that this control serves
-
-
Constructor Details
-
AbstractPhysicsDebugControl
Instantiate an enabled control to serve the specified debug app state.- Parameters:
debugAppState
- which app state (not null, alias created)
-
-
Method Details
-
controlUpdate
protected abstract void controlUpdate(float tpf) This is called on the physics thread for debug controls- Specified by:
controlUpdate
in classAbstractControl
- Parameters:
tpf
- time per frame (in seconds)
-
applyPhysicsTransform
Apply the specified location and orientation to the controlled spatial.- Parameters:
worldLocation
- location vector (in physics-space coordinates, not null, unaffected)worldRotation
- orientation (in physics-space coordinates, not null, unaffected)
-
applyPhysicsTransform
protected void applyPhysicsTransform(Vector3f worldLocation, Quaternion worldRotation, Spatial spatial) Apply the specified location and orientation to the specified spatial.- Parameters:
worldLocation
- location vector (in physics-space coordinates, not null, unaffected)worldRotation
- orientation (in physics-space coordinates, not null, unaffected)spatial
- where to apply (may be null)
-