public class CapsuleCollisionShape extends CollisionShape
| Modifier and Type | Field and Description |
|---|---|
protected int |
axis |
protected float |
height |
protected float |
radius |
cShape, margin, scale| Modifier | Constructor and Description |
|---|---|
protected |
CapsuleCollisionShape() |
|
CapsuleCollisionShape(float radius,
float height)
Creates a new CapsuleCollisionShape with the given radius and height.
|
|
CapsuleCollisionShape(float radius,
float height,
int axis)
Creates a capsule shape around the given axis (0=X,1=Y,2=Z).
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
createShape() |
int |
getAxis() |
float |
getHeight() |
float |
getRadius() |
void |
read(JmeImporter im) |
void |
write(JmeExporter ex) |
calculateLocalInertia, getCShape, getDefaultMargin, getMargin, getScale, setCShape, setDefaultMargin, setMargin, setScaleprotected CapsuleCollisionShape()
public CapsuleCollisionShape(float radius,
float height)
radius - the radius of the capsuleheight - the height of the capsulepublic CapsuleCollisionShape(float radius,
float height,
int axis)
radius - the desired unscaled radiusheight - the desired unscaled height of the cylindrical portionaxis - which local axis for the height: 0→X, 1→Y,
2→Zpublic float getRadius()
public float getHeight()
public int getAxis()
public void write(JmeExporter ex) throws java.io.IOException
write in interface Savablewrite in class CollisionShapejava.io.IOExceptionpublic void read(JmeImporter im) throws java.io.IOException
read in interface Savableread in class CollisionShapejava.io.IOExceptionprotected void createShape()