public class CapsuleCollisionShape extends CollisionShape
| Modifier and Type | Field and Description |
|---|---|
protected int |
axis |
protected float |
height |
protected float |
radius |
margin, objectId, scale| Constructor and Description |
|---|
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(com.jme3.export.JmeImporter im) |
void |
setScale(com.jme3.math.Vector3f scale)
WARNING - CompoundCollisionShape scaling has no effect.
|
void |
write(com.jme3.export.JmeExporter ex) |
finalize, getMargin, getObjectId, getScale, setMargin, setObjectIdpublic 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 setScale(com.jme3.math.Vector3f scale)
setScale in class CollisionShapepublic void write(com.jme3.export.JmeExporter ex)
throws java.io.IOException
write in interface com.jme3.export.Savablewrite in class CollisionShapejava.io.IOExceptionpublic void read(com.jme3.export.JmeImporter im)
throws java.io.IOException
read in interface com.jme3.export.Savableread in class CollisionShapejava.io.IOExceptionprotected void createShape()