Package com.jme3.bullet.debug
Class AbstractPhysicsDebugControl
java.lang.Object
com.jme3.scene.control.AbstractControl
com.jme3.bullet.debug.AbstractPhysicsDebugControl
- All Implemented Interfaces:
com.jme3.export.Savable
,com.jme3.scene.control.Control
,com.jme3.util.clone.JmeCloneable
,Cloneable
- Direct Known Subclasses:
BulletCharacterDebugControl
,BulletGhostObjectDebugControl
,BulletRigidBodyDebugControl
,BulletVehicleDebugControl
public abstract class AbstractPhysicsDebugControl
extends com.jme3.scene.control.AbstractControl
The abstract base class for physics-debug controls (such as
BulletRigidBodyDebugControl) used to visualize individual collision objects
and joints.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final BulletDebugAppState
AppState that this Control servesFields inherited from class com.jme3.scene.control.AbstractControl
enabled, spatial
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractPhysicsDebugControl
(BulletDebugAppState debugAppState) Instantiate an enabled Control to serve the specified debug app state. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
applyPhysicsTransform
(com.jme3.math.Vector3f worldLocation, com.jme3.math.Quaternion worldRotation) Apply the specified location and orientation to the controlled spatial.void
cloneFields
(com.jme3.util.clone.Cloner cloner, Object original) Callback fromCloner
to convert this shallow-cloned Control into a deep-cloned one, using the specified Cloner and original to resolve copied fields.protected void
controlRender
(com.jme3.renderer.RenderManager rm, com.jme3.renderer.ViewPort vp) Render this Control.jmeClone()
Create a shallow clone for the JME cloner.void
read
(com.jme3.export.JmeImporter importer) De-serialize this Control from the specified importer, for example when loading from a J3O file.void
write
(com.jme3.export.JmeExporter exporter) Serialize this Control to the specified exporter, for example when saving to a J3O file.Methods inherited from class com.jme3.scene.control.AbstractControl
cloneForSpatial, controlUpdate, getSpatial, isEnabled, render, setEnabled, setSpatial, update
-
Field Details
-
debugAppState
AppState 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
-
applyPhysicsTransform
protected void applyPhysicsTransform(com.jme3.math.Vector3f worldLocation, com.jme3.math.Quaternion worldRotation) 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)
-
cloneFields
Callback fromCloner
to convert this shallow-cloned Control into a deep-cloned one, using the specified Cloner and original to resolve copied fields.- Specified by:
cloneFields
in interfacecom.jme3.util.clone.JmeCloneable
- Overrides:
cloneFields
in classcom.jme3.scene.control.AbstractControl
- Parameters:
cloner
- the Cloner that's cloning this Control (unused)original
- the instance from which this Control was shallow-cloned (unused)
-
controlRender
protected void controlRender(com.jme3.renderer.RenderManager rm, com.jme3.renderer.ViewPort vp) Render this Control. Invoked once per ViewPort per frame, provided the Control is enabled and added to a scene. Should be invoked only by a subclass or by AbstractControl.- Specified by:
controlRender
in classcom.jme3.scene.control.AbstractControl
- Parameters:
rm
- the render manager (unused)vp
- the view port to render (unused)
-
jmeClone
Create a shallow clone for the JME cloner.- Specified by:
jmeClone
in interfacecom.jme3.util.clone.JmeCloneable
- Overrides:
jmeClone
in classcom.jme3.scene.control.AbstractControl
- Returns:
- never
- Throws:
UnsupportedOperationException
- always
-
read
De-serialize this Control from the specified importer, for example when loading from a J3O file.- Specified by:
read
in interfacecom.jme3.export.Savable
- Overrides:
read
in classcom.jme3.scene.control.AbstractControl
- Parameters:
importer
- (unused)- Throws:
IOException
- neverUnsupportedOperationException
- always
-
write
Serialize this Control to the specified exporter, for example when saving to a J3O file.- Specified by:
write
in interfacecom.jme3.export.Savable
- Overrides:
write
in classcom.jme3.scene.control.AbstractControl
- Parameters:
exporter
- (unused)- Throws:
IOException
- neverUnsupportedOperationException
- always
-