public class PhysicsGhostObject extends PhysicsCollisionObject
btPairCachingGhostObject. This is useful for creating a character
controller, collision sensors/triggers, explosions etc.
Overlap detection skips the narrow-phase collision-detection algorithm and
relies entirely on the broad-phase algorithm, which is AABB plus a margin of
about 0.06 world units. Precise collision detection is still available via
PhysicsSpace.addCollisionListener().
From Bullet manual:
btGhostObject is a special btCollisionObject, useful for fast localized
collision queries.
| Modifier and Type | Field and Description |
|---|---|
static java.util.logging.Logger |
logger2
message logger for this class
|
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, loggerloggerN| Constructor and Description |
|---|
PhysicsGhostObject(CollisionShape shape)
Instantiate a ghost object with the specified CollisionShape.
|
| Modifier and Type | Method and Description |
|---|---|
PhysicsCollisionObject |
getOverlapping(int index)
Access an overlapping collision object by its position in the list.
|
int |
getOverlappingCount()
Count how many collision objects this object overlaps.
|
java.util.List<PhysicsCollisionObject> |
getOverlappingObjects()
Update and access a list of overlapping objects.
|
void |
setCollisionShape(CollisionShape collisionShape)
Apply the specified CollisionShape to this object.
|
void |
setPhysicsLocation(Vector3f location)
Directly alter the location of the ghost's center.
|
void |
setPhysicsLocationDp(Vec3d location)
Directly alter the location of the ghost's center.
|
void |
setPhysicsRotation(Matrix3f orientation)
Directly alter the ghost's orientation.
|
void |
setPhysicsRotation(Quaternion orientation)
Directly alter the ghost's orientation.
|
void |
setPhysicsRotationDp(Matrix3d orientation)
Directly alter the ghost's orientation.
|
void |
setPhysicsRotationDp(Quatd orientation)
Directly alter the ghost's orientation.
|
activate, addCollideWithGroup, addToIgnoreList, attachCollisionShape, boundingBox, clearIgnoreList, collisionFlags, copyPcoProperties, countIgnored, finalizeNative, findInstance, getActivationState, getAnisotropicFriction, getCcdMotionThreshold, getCcdSquareMotionThreshold, getCcdSweptSphereRadius, getCollideWithGroups, getCollisionGroup, getCollisionShape, getCollisionSpace, getContactDamping, getContactProcessingThreshold, getContactStiffness, getDeactivationTime, getFriction, getInternalType, getPhysicsLocation, getPhysicsLocationDp, getPhysicsRotation, getPhysicsRotationDp, getPhysicsRotationMatrix, getPhysicsRotationMatrixDp, getRestitution, getRollingFriction, getScale, getSpinningFriction, getTransform, getTransformDp, getUserObject, hasAnisotropicFriction, ignores, initUserPointer, isActive, isContactResponse, isInWorld, isStatic, listIgnoredPcos, proxyGroup, proxyMask, removeCollideWithGroup, removeFromIgnoreList, setActivationState, setAnisotropicFriction, setCcdMotionThreshold, setCcdSweptSphereRadius, setCollideWithGroups, setCollisionFlags, setCollisionGroup, setContactDamping, setContactProcessingThreshold, setContactStiffness, setDeactivationTime, setFriction, setIgnoreList, setLocationAndBasis, setRestitution, setRollingFriction, setSpinningFriction, setUserIndex, setUserIndex2, setUserIndex3, setUserObject, spaceId, toString, userIndex, userIndex2, userIndex3compareTo, countTrackers, dumpTrackers, equals, freeUnusedObjects, hasAssignedNativeObject, hashCode, nativeId, reassignNativeId, setNativeId, setNativeIdNotTracked, unassignNativeObjectpublic static final java.util.logging.Logger logger2
public PhysicsGhostObject(CollisionShape shape)
shape - the desired shape (not null, alias created)public PhysicsCollisionObject getOverlapping(int index)
getOverlappingObjects() must be invoked first!index - which list position (≥0, <count)public int getOverlappingCount()
public java.util.List<PhysicsCollisionObject> getOverlappingObjects()
public void setPhysicsLocation(Vector3f location)
location - the desired location (in physics-space coordinates, not
null, finite, unaffected)public void setPhysicsLocationDp(Vec3d location)
location - the desired location (in physics-space coordinates, not
null, finite, unaffected)public void setPhysicsRotation(Matrix3f orientation)
orientation - the desired orientation (a rotation matrix in
physics-space coordinates, not null, unaffected)public void setPhysicsRotation(Quaternion orientation)
orientation - the desired orientation (a rotation quaternion in
physics-space coordinates, not null, not zero, unaffected)public void setPhysicsRotationDp(Matrix3d orientation)
orientation - the desired orientation (a rotation matrix in
physics-space coordinates, not null, unaffected)public void setPhysicsRotationDp(Quatd orientation)
orientation - the desired orientation (a rotation quaternion in
physics-space coordinates, not null, not zero, unaffected)public void setCollisionShape(CollisionShape collisionShape)
setCollisionShape in class PhysicsCollisionObjectcollisionShape - the shape to apply (not null, alias created)