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, setScale
protected 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
- height
- axis
- public float getRadius()
public float getHeight()
public int getAxis()
public void write(JmeExporter ex) throws java.io.IOException
write
in interface Savable
write
in class CollisionShape
java.io.IOException
public void read(JmeImporter im) throws java.io.IOException
read
in interface Savable
read
in class CollisionShape
java.io.IOException
protected void createShape()