|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.bullet.collision.PhysicsCollisionObject
com.jme3.bullet.objects.PhysicsGhostObject
com.jme3.bullet.control.GhostControl
public class GhostControl
A GhostControl moves with the spatial it is attached to and can be used to check overlaps with other physics objects (e.g. aggro radius).
Field Summary | |
---|---|
protected boolean |
added
|
protected boolean |
applyLocal
|
protected boolean |
enabled
|
protected PhysicsSpace |
space
|
protected Spatial |
spatial
|
Fields inherited from class com.jme3.bullet.objects.PhysicsGhostObject |
---|
locationDirty, tmp_inverseWorldRotation |
Constructor Summary | |
---|---|
GhostControl()
|
|
GhostControl(CollisionShape shape)
|
Method Summary | |
---|---|
Control |
cloneForSpatial(Spatial spatial)
Creates a clone of the Control, the given Spatial is the cloned version of the spatial to which this control is attached to. |
PhysicsSpace |
getPhysicsSpace()
|
boolean |
isApplyPhysicsLocal()
|
boolean |
isEnabled()
|
void |
read(JmeImporter im)
|
void |
render(RenderManager rm,
ViewPort vp)
Should be called prior to queuing the spatial by the RenderManager. |
void |
setApplyPhysicsLocal(boolean applyPhysicsLocal)
When set to true, the physics coordinates will be applied to the local translation of the Spatial |
void |
setEnabled(boolean enabled)
The physics object is removed from the physics space when the control is disabled. |
void |
setPhysicsSpace(PhysicsSpace space)
|
void |
setSpatial(Spatial spatial)
|
void |
update(float tpf)
Updates the control. |
void |
write(JmeExporter ex)
|
Methods inherited from class com.jme3.bullet.collision.PhysicsCollisionObject |
---|
addCollideWithGroup, attachCollisionShape, attachDebugShape, attachDebugShape, attachDebugShape, createDebugShape, debugShape, detachDebugShape, finalize, finalizeNative, getCollideWithGroups, getCollisionGroup, getCollisionShape, getDebugShape, getObjectId, getUserObject, initUserPointer, removeCollideWithGroup, setCollideWithGroups, setCollisionGroup, setUserObject, updateDebugShape |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Spatial spatial
protected boolean enabled
protected boolean added
protected PhysicsSpace space
protected boolean applyLocal
Constructor Detail |
---|
public GhostControl()
public GhostControl(CollisionShape shape)
Method Detail |
---|
public boolean isApplyPhysicsLocal()
public void setApplyPhysicsLocal(boolean applyPhysicsLocal)
applyPhysicsLocal
- public Control cloneForSpatial(Spatial spatial)
Control
cloneForSpatial
in interface Control
public void setSpatial(Spatial spatial)
setSpatial
in interface Control
spatial
- the spatial to be controlled. This should not be called
from user code.public void setEnabled(boolean enabled)
PhysicsControl
setEnabled
in interface PhysicsControl
public boolean isEnabled()
public void update(float tpf)
Control
update
in interface Control
tpf
- Time per frame.public void render(RenderManager rm, ViewPort vp)
Control
render
in interface Control
public void setPhysicsSpace(PhysicsSpace space)
setPhysicsSpace
in interface PhysicsControl
public PhysicsSpace getPhysicsSpace()
getPhysicsSpace
in interface PhysicsControl
public void write(JmeExporter ex) throws java.io.IOException
write
in interface Savable
write
in class PhysicsGhostObject
java.io.IOException
public void read(JmeImporter im) throws java.io.IOException
read
in interface Savable
read
in class PhysicsGhostObject
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |