public class CylinderCollisionShape extends ConvexShape
btCylinderShapeX,
btCylinderShape, or btCylinderShapeZ.| Modifier and Type | Field and Description |
|---|---|
static java.util.logging.Logger |
logger2
message logger for this class
|
loggerXenableContactFilter, logger, margin, scaleloggerN| Constructor and Description |
|---|
CylinderCollisionShape(java.nio.FloatBuffer buffer,
int startPosition,
int endPosition,
int axisIndex)
Instantiate a cylinder shape that encloses the sample locations in the
specified FloatBuffer range.
|
CylinderCollisionShape(float radius,
float height,
int axisIndex)
Instantiate a cylinder shape around the specified main (height) axis.
|
CylinderCollisionShape(Vector3f halfExtents)
Instantiate a Z-axis cylinder shape with the specified half extents.
|
CylinderCollisionShape(Vector3f halfExtents,
int axisIndex)
Instantiate a cylinder shape around the specified axis.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canScale(Vector3f scale)
Test whether the specified scale factors can be applied to this shape.
|
int |
getAxis()
Return the main (height) axis of the cylinder.
|
Vector3f |
getHalfExtents(Vector3f storeResult)
Copy the half extents of the cylinder.
|
float |
getHeight()
Return the height of the cylinder.
|
float |
maxRadius()
Calculate how far the scaled shape extends from its center.
|
HullCollisionShape |
toHullShape()
Approximate this shape with a HullCollisionShape.
|
float |
unscaledVolume()
Return the unscaled volume of the cylinder.
|
isConcave, isConvex, scaledVolume, toSplittableShapeaabbCenter, boundingBox, boundingBox, canSplit, getDefaultMargin, getMargin, getScale, getScaleDp, getShapeType, getShapeType, isContactFilterEnabled, isInfinite, isNonMoving, isPolyhedral, nativeMargin, recalculateAabb, 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 CylinderCollisionShape(float radius,
float height,
int axisIndex)
radius - the desired unscaled radius (≥0)height - the desired unscaled height (≥0)axisIndex - which local axis to use for the height: 0→X,
1→Y, 2→Z (default=2)public CylinderCollisionShape(java.nio.FloatBuffer buffer,
int startPosition,
int endPosition,
int axisIndex)
buffer - the buffer that contains the sample locations (not null,
unaffected)startPosition - the position at which the sample locations start
(≥0, ≤endPosition)endPosition - the position at which the sample locations end
(≥startPosition, ≤capacity)axisIndex - which local axis to use for the height: 0→X,
1→Y, 2→Zpublic CylinderCollisionShape(Vector3f halfExtents)
halfExtents - the desired unscaled half extents (not null, no
negative component, unaffected)public CylinderCollisionShape(Vector3f halfExtents, int axisIndex)
halfExtents - the desired unscaled half extents (not null, no
negative component, unaffected)axisIndex - which local axis to use for the height: 0→X,
1→Y, 2→Zpublic int getAxis()
public Vector3f getHalfExtents(Vector3f storeResult)
storeResult - storage for the result (modified if not null)public float getHeight()
public float unscaledVolume()
public boolean canScale(Vector3f scale)
canScale in class CollisionShapescale - the desired scale factor for each local axis (may be null,
unaffected)public float maxRadius()
maxRadius in class CollisionShapepublic HullCollisionShape toHullShape()
toHullShape in class ConvexShape