public class ConicalFrustum extends ConvexShape
btConvexInternalShape. By convention, the local Y axis is the height
axis, with the "A" base having y<0 and the "B" base having y>0.
This is an imprecise shape; margin always expands the shape.
| Modifier and Type | Field and Description |
|---|---|
static java.util.logging.Logger |
logger2
message logger for this class
|
loggerXenableContactFilter, logger, margin, scaleloggerN| Constructor and Description |
|---|
ConicalFrustum(float a,
float b,
float height)
Instantiate a conical frustum with the specified dimensions.
|
| Modifier and Type | Method and Description |
|---|---|
float |
aRadius()
Return the radius of the "A" base.
|
float |
bRadius()
Return the radius of the "B" base.
|
boolean |
canScale(Vector3f scale)
Test whether the specified scale factors can be applied to the shape.
|
float |
height()
Return the height of the frustum.
|
float |
maxRadius()
Calculate how far the scaled shape extends from its center of mass,
including collision margin.
|
float |
scaledVolume()
Estimate the volume of the collision shape, including scale and margin.
|
isConcave, isConvex, 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 ConicalFrustum(float a,
float b,
float height)
a - the desired radius of the "A" base for scale=(1,1,1) (>0)b - the desired radius of the "B" base for scale=(1,1,1) (>0)height - the desired height for scale=(1,1,1) (>0)public float aRadius()
public float bRadius()
public float height()
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 float scaledVolume()
scaledVolume in class ConvexShape