Package com.jme3.bullet.objects
Class MultiBodyCollider
java.lang.Object
com.jme3.bullet.NativePhysicsObject
com.jme3.bullet.collision.PhysicsCollisionObject
com.jme3.bullet.objects.MultiBodyCollider
- All Implemented Interfaces:
Comparable<NativePhysicsObject>
A collision object for a link or base in a MultiBody, based on Bullet's
btMultiBodyLinkCollider.
-
Field Summary
Fields inherited from class com.jme3.bullet.collision.PhysicsCollisionObject
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, logger
Fields inherited from class com.jme3.bullet.NativePhysicsObject
loggerN
-
Constructor Summary
ConstructorDescriptionMultiBodyCollider
(MultiBody multiBody, int linkIndex) Instantiate a collider for the indexed link in the specified MultiBody. -
Method Summary
Modifier and TypeMethodDescriptionvoid
attachShape
(CollisionShape shape) Attach the specified collision shape to this collider.Access the MultiBody that contains this collider.int
Determine the index of the corresponding MultiBodyLink.float
mass()
Determine the mass of this collider.void
setPhysicsLocation
(Vector3f location) Directly alter the location of this collider's center.void
setPhysicsLocationDp
(Vec3d location) Directly alter the location of this collider's center.void
setPhysicsRotation
(Matrix3f orientation) Directly alter this collider's orientation.void
setPhysicsRotationDp
(Matrix3d orientation) Directly alter this collider's orientation.Methods inherited from class com.jme3.bullet.collision.PhysicsCollisionObject
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, setCollisionShape, setContactDamping, setContactProcessingThreshold, setContactStiffness, setDeactivationTime, setFriction, setIgnoreList, setLocationAndBasis, setRestitution, setRollingFriction, setSpinningFriction, setUserIndex, setUserIndex2, setUserIndex3, setUserObject, spaceId, toString, userIndex, userIndex2, userIndex3
Methods inherited from class com.jme3.bullet.NativePhysicsObject
compareTo, countTrackers, dumpTrackers, equals, freeUnusedObjects, hasAssignedNativeObject, hashCode, nativeId, reassignNativeId, setNativeId, setNativeIdNotTracked, unassignNativeObject
-
Field Details
-
logger2
message logger for this class
-
-
Constructor Details
-
MultiBodyCollider
Instantiate a collider for the indexed link in the specified MultiBody. Used internally.- Parameters:
multiBody
- (not null, alias created)linkIndex
- the link index, or -1 for the base
-
-
Method Details
-
attachShape
Attach the specified collision shape to this collider. Used internally.- Parameters:
shape
- the shape to attach (not null, alias created)
-
getMultiBody
Access the MultiBody that contains this collider.- Returns:
- the pre-existing instance (not null)
-
linkIndex
public int linkIndex()Determine the index of the corresponding MultiBodyLink.- Returns:
- the index (≥0) or -1 if this is the base collider
-
mass
public float mass()Determine the mass of this collider.- Returns:
- the mass (>0)
-
setPhysicsLocation
Directly alter the location of this collider's center.- Parameters:
location
- the desired location (in physics-space coordinates, not null, finite, unaffected)
-
setPhysicsLocationDp
Directly alter the location of this collider's center.- Parameters:
location
- the desired location (in physics-space coordinates, not null, finite, unaffected)
-
setPhysicsRotation
Directly alter this collider's orientation.- Parameters:
orientation
- the desired orientation (a rotation matrix in physics-space coordinates, not null, unaffected)
-
setPhysicsRotationDp
Directly alter this collider's orientation.- Parameters:
orientation
- the desired orientation (a rotation matrix in physics-space coordinates, not null, unaffected)
-