public class GImpactCollisionShape extends CollisionShape
btGImpactMeshShape.
Collisions between GImpactCollisionShape and
PlaneCollisionShape objects are never detected.
| Modifier and Type | Field and Description |
|---|---|
static java.util.logging.Logger |
logger2
message logger for this class
|
enableContactFilter, logger, margin, scaleloggerN| Constructor and Description |
|---|
GImpactCollisionShape(CompoundMesh mesh,
Vector3f offset)
Instantiate a shape based on the specified CompoundMesh and offset.
|
GImpactCollisionShape(IndexedMesh... submeshes)
Instantiate a shape based on the specified native mesh(es).
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canSplit()
Test whether the shape can be split by an arbitrary plane.
|
int |
countMeshTriangles()
Count how many triangles are in the mesh.
|
int |
countMeshVertices()
Count how many vertices are in the mesh.
|
int |
countSubmeshes()
Count how many submeshes are in the mesh.
|
IndexedMesh |
getSubmesh(int index)
Access the specified submesh.
|
protected void |
recalculateAabb()
Recalculate this shape's bounding box if necessary.
|
void |
setScale(Vector3f scale)
Alter the scale factors of this shape.
|
ChildCollisionShape[] |
split(Triangle splittingTriangle)
Attempt to divide this shape into 2 shapes.
|
aabbCenter, boundingBox, boundingBox, canScale, getDefaultMargin, getMargin, getScale, getScaleDp, getShapeType, getShapeType, isConcave, isContactFilterEnabled, isConvex, isInfinite, isNonMoving, isPolyhedral, maxRadius, nativeMargin, scaledVolume, setContactFilterEnabled, setDefaultMargin, setMargin, setNativeId, setScale, setUserIndex, setUserIndex2, toSplittableShape, toString, updateScale, userIndex, userIndex2compareTo, countTrackers, dumpTrackers, equals, freeUnusedObjects, hasAssignedNativeObject, hashCode, nativeId, reassignNativeId, setNativeIdNotTracked, unassignNativeObjectpublic static final java.util.logging.Logger logger2
public GImpactCollisionShape(CompoundMesh mesh, Vector3f offset)
mesh - the mesh on which to base the shape (not null, unaffected)offset - the offset to add to the vertex positions (not null,
unaffected)public GImpactCollisionShape(IndexedMesh... submeshes)
submeshes - the mesh(es) on which to base the shape (not null)public int countMeshTriangles()
public int countMeshVertices()
public int countSubmeshes()
public IndexedMesh getSubmesh(int index)
index - the index of the desired submesh (in the order the submeshes
were added, ≥0)public ChildCollisionShape[] split(Triangle splittingTriangle)
splittingTriangle - to define the splitting plane (in shape
coordinates, not null, unaffected)public boolean canSplit()
canSplit in class CollisionShapeprotected void recalculateAabb()
recalculateAabb in class CollisionShapepublic void setScale(Vector3f scale)
Note that if the shape is shared (between collision objects and/or compound shapes) changes can have unintended consequences.
setScale in class CollisionShapescale - the desired scale factor for each local axis (not null, no
negative component, unaffected, default=(1,1,1))