public class ConeCollisionShape extends ConvexShape
btConeShapeX,
btConeShape, or btConeShapeZ.| Modifier and Type | Field and Description |
|---|---|
static java.util.logging.Logger |
logger2
message logger for this class
|
loggerXenableContactFilter, logger, margin, scaleloggerN| Constructor and Description |
|---|
ConeCollisionShape(float radius,
float height)
Instantiate a cone shape, oriented along the local Y axis.
|
ConeCollisionShape(float radius,
float height,
int axisIndex)
Instantiate a cone shape around the specified main (height) 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 cone.
|
float |
getHeight()
Return the height of the cone.
|
float |
getRadius()
Return the radius of the cone's base.
|
float |
maxRadius()
Calculate how far the scaled shape extends from its center of mass,
including collision margin.
|
float |
unscaledVolume()
Return the unscaled volume of the cone.
|
isConcave, isConvex, scaledVolume, toHullShape, 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 ConeCollisionShape(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=1)public ConeCollisionShape(float radius,
float height)
radius - the desired unscaled radius (≥0)height - the desired unscaled height (≥0)public int getAxis()
public float getHeight()
public float getRadius()
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 CollisionShape