Package com.jme3.bullet.debug
Class BulletJointDebugControl
java.lang.Object
com.jme3.scene.control.AbstractControl
com.jme3.bullet.debug.AbstractPhysicsDebugControl
com.jme3.bullet.debug.BulletJointDebugControl
- All Implemented Interfaces:
com.jme3.export.Savable,com.jme3.scene.control.Control,com.jme3.util.clone.JmeCloneable,Cloneable
A physics-debug control used to visualize a PhysicsJoint.
This class is shared between JBullet and Native Bullet.
- Author:
- normenhansen
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final com.jme3.math.Transformprotected final com.jme3.scene.debug.Arrowprotected final com.jme3.scene.debug.Arrowprotected final com.jme3.math.Transformprotected final PhysicsJointprotected final com.jme3.scene.Geometryprotected final com.jme3.scene.Geometryprotected final com.jme3.math.Vector3fprotected final com.jme3.math.Vector3fFields inherited from class com.jme3.bullet.debug.AbstractPhysicsDebugControl
debugAppStateFields inherited from class com.jme3.scene.control.AbstractControl
enabled, spatial -
Constructor Summary
ConstructorsConstructorDescriptionBulletJointDebugControl(BulletDebugAppState debugAppState, PhysicsJoint body) Instantiate an enabled control to visualize the specified joint. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcontrolRender(com.jme3.renderer.RenderManager rm, com.jme3.renderer.ViewPort vp) Render this control.protected voidcontrolUpdate(float tpf) Update this control.voidsetSpatial(com.jme3.scene.Spatial spatial) Alter which spatial is controlled.Methods inherited from class com.jme3.bullet.debug.AbstractPhysicsDebugControl
applyPhysicsTransform, applyPhysicsTransformMethods inherited from class com.jme3.scene.control.AbstractControl
cloneFields, cloneForSpatial, getSpatial, isEnabled, jmeClone, read, render, setEnabled, update, write
-
Field Details
-
body
-
geomA
protected final com.jme3.scene.Geometry geomA -
arrowA
protected final com.jme3.scene.debug.Arrow arrowA -
geomB
protected final com.jme3.scene.Geometry geomB -
arrowB
protected final com.jme3.scene.debug.Arrow arrowB -
a
protected final com.jme3.math.Transform a -
b
protected final com.jme3.math.Transform b -
offA
protected final com.jme3.math.Vector3f offA -
offB
protected final com.jme3.math.Vector3f offB
-
-
Constructor Details
-
BulletJointDebugControl
Instantiate an enabled control to visualize the specified joint.- Parameters:
debugAppState- which app state (not null, alias created)body- the joint to visualize (not null, alias created)
-
-
Method Details
-
setSpatial
public void setSpatial(com.jme3.scene.Spatial spatial) Alter which spatial is controlled. Invoked when the control is added to or removed from a spatial. Should be invoked only by a subclass or from Spatial. Do not invoke directly from user code.- Specified by:
setSpatialin interfacecom.jme3.scene.control.Control- Overrides:
setSpatialin classcom.jme3.scene.control.AbstractControl- Parameters:
spatial- the spatial to control (or null)
-
controlUpdate
protected void controlUpdate(float tpf) Update this control. Invoked once per frame during the logical-state update, provided the control is enabled and added to a scene. Should be invoked only by a subclass or by AbstractControl.- Specified by:
controlUpdatein classAbstractPhysicsDebugControl- Parameters:
tpf- the time interval between frames (in seconds, ≥0)
-
controlRender
protected void controlRender(com.jme3.renderer.RenderManager rm, com.jme3.renderer.ViewPort vp) Render this control. Invoked once per frame, provided the control is enabled and added to a scene. Should be invoked only by a subclass or by AbstractControl.- Specified by:
controlRenderin classcom.jme3.scene.control.AbstractControl- Parameters:
rm- the render manager (not null)vp- the view port to render (not null)
-