public class SphericalSegment extends ConvexShape
btConvexInternalShape. By convention, both bases are orthogonal to
the local Y axis.
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 |
|---|
SphericalSegment(float radius)
Instantiate a hemisphere with the specified radius.
|
SphericalSegment(float radius,
float yMax,
float yMin)
Instantiate a spherical segment with the specified dimensions.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canScale(Vector3f scale)
Test whether the specified scale factors can be applied to the shape.
|
float |
getHeight()
Return the height of the segment.
|
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.
|
float |
sphereRadius()
Return the radius of the parent sphere.
|
float |
yMax()
Return the Y offset of the upper base from the center of the parent
sphere.
|
float |
yMin()
Return the Y offset of the lower base from the center of the parent
sphere.
|
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 SphericalSegment(float radius)
radius - the desired radius, before scaling and excluding margin
(>0)public SphericalSegment(float radius,
float yMax,
float yMin)
radius - the desired radius of the parent sphere, before scaling and
excluding margin (>0)yMax - the Y offset of the upper base from the center of the parent
sphere, before scaling and excluding margin (≥yMin, ≤radius)yMin - the Y offset of the lower base from the center of the parent
sphere, before scaling and excluding margin (≥-radius, ≤yMax)public float getHeight()
public float sphereRadius()
public float yMax()
public float yMin()
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