public class HullCollisionShape extends ConvexShape
btConvexHullShape.
For a 2-D convex hull, use Convex2dShape.| Modifier and Type | Field and Description |
|---|---|
static java.util.logging.Logger |
logger2
message logger for this class
|
loggerXenableContactFilter, logger, margin, scaleloggerN| Constructor and Description |
|---|
HullCollisionShape(java.util.Collection<Vector3f> locations)
Instantiate a shape based on the specified collection of locations.
|
HullCollisionShape(float... points)
Instantiate a shape based on an array containing coordinates.
|
HullCollisionShape(java.nio.FloatBuffer flippedBuffer)
Instantiate a shape based on a flipped buffer containing coordinates.
|
HullCollisionShape(RectangularSolid rectangularSolid)
Instantiate an 8-vertex shape to match the specified rectangular solid.
|
HullCollisionShape(Vector3f... locations)
Instantiate a shape based on an array of locations.
|
HullCollisionShape(Vhacd4Hull vhacd4Hull)
Instantiate a shape based on a Vhacd4Hull.
|
HullCollisionShape(VHACDHull vhacdHull)
Instantiate a shape based on a VHACDHull.
|
| Modifier and Type | Method and Description |
|---|---|
float |
aabbVolume()
Calculate a quick upper bound for the unscaled volume of the hull, based
on its axis-aligned bounding box.
|
boolean |
canSplit()
Test whether the shape can be split by an arbitrary plane.
|
float[] |
copyHullVertices()
Copy the unscaled vertex locations of the optimized convex hull.
|
int |
countHullVertices()
Count the number of vertices in the optimized convex hull.
|
int |
countMeshVertices()
Count the vertices used to generate the hull.
|
Vector3f |
getHalfExtents(Vector3f storeResult)
Calculate the unscaled half extents of the hull.
|
float |
maxRadius()
Calculate how far this shape extends from its center, including margin.
|
protected void |
recalculateAabb()
Recalculate the shape's bounding box if necessary.
|
ChildCollisionShape[] |
split(Triangle splittingTriangle)
Attempt to divide this shape into 2 child shapes.
|
isConcave, isConvex, scaledVolume, toHullShape, toSplittableShapeaabbCenter, boundingBox, boundingBox, canScale, getDefaultMargin, getMargin, getScale, getScaleDp, getShapeType, getShapeType, isContactFilterEnabled, isInfinite, isNonMoving, isPolyhedral, nativeMargin, setContactFilterEnabled, setDefaultMargin, setMargin, setNativeId, setScale, setScale, setUserIndex, setUserIndex2, toString, updateScale, userIndex, userIndex2compareTo, countTrackers, dumpTrackers, equals, freeUnusedObjects, hasAssignedNativeObject, hashCode, nativeId, reassignNativeId, setNativeIdNotTracked, unassignNativeObjectpublic static final java.util.logging.Logger logger2
public HullCollisionShape(java.util.Collection<Vector3f> locations)
locations - a collection of location vectors on which to base the
shape (not null, not empty, unaffected)public HullCollisionShape(float... points)
points - an array of coordinates on which to base the shape (not
null, not empty, length a multiple of 3, unaffected)public HullCollisionShape(java.nio.FloatBuffer flippedBuffer)
flippedBuffer - the coordinates on which to base the shape (not
null, limit>0, limit a multiple of 3, unaffected)public HullCollisionShape(RectangularSolid rectangularSolid)
rectangularSolid - the solid on which to base the shape (not null)public HullCollisionShape(Vector3f... locations)
locations - an array of location vectors (in shape coordinates, not
null, not empty, unaffected)public HullCollisionShape(Vhacd4Hull vhacd4Hull)
vhacd4Hull - (not null, unaffected)public HullCollisionShape(VHACDHull vhacdHull)
vhacdHull - (not null, unaffected)public float aabbVolume()
public float[] copyHullVertices()
public int countHullVertices()
public int countMeshVertices()
public Vector3f getHalfExtents(Vector3f storeResult)
storeResult - storage for the result (modified if not null)public ChildCollisionShape[] split(Triangle splittingTriangle)
splittingTriangle - to define the splitting plane (in shape
coordinates, not null, unaffected)public boolean canSplit()
canSplit in class CollisionShapepublic float maxRadius()
maxRadius in class CollisionShapeprotected void recalculateAabb()
recalculateAabb in class CollisionShape