|
||||||||||
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
public class PhysicsGhostObject
From Bullet manual:
GhostObject can keep track of all objects that are overlapping.
By default, this overlap is based on the AABB.
This is useful for creating a character controller,
collision sensors/triggers, explosions etc.
Field Summary | |
---|---|
protected boolean |
locationDirty
|
protected Quaternion |
tmp_inverseWorldRotation
|
Constructor Summary | |
---|---|
PhysicsGhostObject()
|
|
PhysicsGhostObject(CollisionShape shape)
|
|
PhysicsGhostObject(Spatial child,
CollisionShape shape)
|
Method Summary | |
---|---|
protected void |
buildObject()
|
void |
destroy()
destroys this PhysicsGhostNode and removes it from memory |
float |
getCcdMotionThreshold()
|
float |
getCcdSquareMotionThreshold()
|
float |
getCcdSweptSphereRadius()
|
PhysicsCollisionObject |
getOverlapping(int index)
|
int |
getOverlappingCount()
|
java.util.List<PhysicsCollisionObject> |
getOverlappingObjects()
Another Object is overlapping with this GhostNode, if and if only there CollisionShapes overlaps. |
protected void |
getOverlappingObjects(long objectId)
|
Vector3f |
getPhysicsLocation()
|
Vector3f |
getPhysicsLocation(Vector3f trans)
|
Quaternion |
getPhysicsRotation()
|
Quaternion |
getPhysicsRotation(Quaternion rot)
|
Matrix3f |
getPhysicsRotationMatrix()
|
Matrix3f |
getPhysicsRotationMatrix(Matrix3f rot)
|
void |
read(JmeImporter e)
|
void |
setCcdMotionThreshold(float threshold)
|
void |
setCcdSweptSphereRadius(float radius)
|
void |
setCollisionShape(CollisionShape collisionShape)
Sets a CollisionShape to this physics object, note that the object should not be in the physics space when adding a new collision shape as it is rebuilt on the physics side. |
void |
setPhysicsLocation(Vector3f location)
Sets the physics object location |
void |
setPhysicsRotation(Matrix3f rotation)
Sets the physics object rotation |
void |
setPhysicsRotation(Quaternion rotation)
Sets the physics object rotation |
void |
write(JmeExporter e)
|
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 boolean locationDirty
protected final Quaternion tmp_inverseWorldRotation
Constructor Detail |
---|
public PhysicsGhostObject()
public PhysicsGhostObject(CollisionShape shape)
public PhysicsGhostObject(Spatial child, CollisionShape shape)
Method Detail |
---|
protected void buildObject()
public void setCollisionShape(CollisionShape collisionShape)
PhysicsCollisionObject
setCollisionShape
in class PhysicsCollisionObject
collisionShape
- the CollisionShape to setpublic void setPhysicsLocation(Vector3f location)
location
- the location of the actual physics objectpublic void setPhysicsRotation(Matrix3f rotation)
rotation
- the rotation of the actual physics objectpublic void setPhysicsRotation(Quaternion rotation)
rotation
- the rotation of the actual physics objectpublic Vector3f getPhysicsLocation(Vector3f trans)
public Quaternion getPhysicsRotation(Quaternion rot)
public Matrix3f getPhysicsRotationMatrix(Matrix3f rot)
public Vector3f getPhysicsLocation()
public Quaternion getPhysicsRotation()
public Matrix3f getPhysicsRotationMatrix()
public void destroy()
public java.util.List<PhysicsCollisionObject> getOverlappingObjects()
protected void getOverlappingObjects(long objectId)
public int getOverlappingCount()
public PhysicsCollisionObject getOverlapping(int index)
index
- The index of the overlapping Node to retrieve.
public void setCcdSweptSphereRadius(float radius)
public void setCcdMotionThreshold(float threshold)
public float getCcdSweptSphereRadius()
public float getCcdMotionThreshold()
public float getCcdSquareMotionThreshold()
public void write(JmeExporter e) throws java.io.IOException
write
in interface Savable
write
in class PhysicsCollisionObject
java.io.IOException
public void read(JmeImporter e) throws java.io.IOException
read
in interface Savable
read
in class PhysicsCollisionObject
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |