public class PhysicsGhostObject extends PhysicsCollisionObject
Modifier and Type | Field and Description |
---|---|
protected com.bulletphysics.collision.dispatch.PairCachingGhostObject |
gObject |
protected boolean |
locationDirty |
protected javax.vecmath.Quat4f |
tempRot |
protected com.bulletphysics.linearmath.Transform |
tempTrans |
protected Quaternion |
tmp_inverseWorldRotation |
COLLISION_GROUP_01, COLLISION_GROUP_02, COLLISION_GROUP_03, COLLISION_GROUP_04, COLLISION_GROUP_05, COLLISION_GROUP_06, COLLISION_GROUP_07, COLLISION_GROUP_08, COLLISION_GROUP_09, COLLISION_GROUP_10, COLLISION_GROUP_11, COLLISION_GROUP_12, COLLISION_GROUP_13, COLLISION_GROUP_14, COLLISION_GROUP_15, COLLISION_GROUP_16, COLLISION_GROUP_NONE, collisionGroup, collisionGroupsMask, collisionShape
Modifier | Constructor and Description |
---|---|
protected |
PhysicsGhostObject() |
|
PhysicsGhostObject(CollisionShape shape) |
|
PhysicsGhostObject(Spatial child,
CollisionShape shape) |
Modifier and Type | Method and Description |
---|---|
protected void |
buildObject() |
void |
destroy()
destroys this PhysicsGhostNode and removes it from memory
|
float |
getCcdMotionThreshold() |
float |
getCcdSquareMotionThreshold() |
float |
getCcdSweptSphereRadius() |
com.bulletphysics.collision.dispatch.PairCachingGhostObject |
getObjectId()
used internally
|
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.
|
Vector3f |
getPhysicsLocation() |
Vector3f |
getPhysicsLocation(Vector3f trans) |
Quaternion |
getPhysicsRotation() |
Quaternion |
getPhysicsRotation(Quaternion rot) |
Matrix3f |
getPhysicsRotationMatrix() |
Matrix3f |
getPhysicsRotationMatrix(Matrix3f rot) |
Transform |
getPhysicsTransform() |
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) |
addCollideWithGroup, getCollideWithGroups, getCollisionGroup, getCollisionShape, getUserObject, removeCollideWithGroup, setCollideWithGroups, setCollisionGroup, setUserObject
protected com.bulletphysics.collision.dispatch.PairCachingGhostObject gObject
protected boolean locationDirty
protected final Quaternion tmp_inverseWorldRotation
protected com.bulletphysics.linearmath.Transform tempTrans
protected javax.vecmath.Quat4f tempRot
protected PhysicsGhostObject()
public PhysicsGhostObject(CollisionShape shape)
public PhysicsGhostObject(Spatial child, CollisionShape shape)
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 Transform getPhysicsTransform()
public Vector3f getPhysicsLocation(Vector3f trans)
trans
- storage for the result (modified if not null)public Quaternion getPhysicsRotation(Quaternion rot)
rot
- storage for the result (modified if not null)public Matrix3f getPhysicsRotationMatrix(Matrix3f rot)
rot
- storage for the result (modified if not null)public Vector3f getPhysicsLocation()
public Quaternion getPhysicsRotation()
public Matrix3f getPhysicsRotationMatrix()
public com.bulletphysics.collision.dispatch.PairCachingGhostObject getObjectId()
public void destroy()
public java.util.List<PhysicsCollisionObject> getOverlappingObjects()
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