public class ConeCollisionShape 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 |
ConeCollisionShape()
Serialization only, do not use.
|
|
ConeCollisionShape(float radius,
float height)
Creates a new cone collision shape with the given height, radius and default Y axis.
|
|
ConeCollisionShape(float radius,
float height,
int axis)
Creates a new cone collision shape with the given height, radius, and axis.
|
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 ConeCollisionShape()
public ConeCollisionShape(float radius, float height, int axis)
radius
- The radius of the cone in world units.height
- The height of the cone in world units.axis
- The axis towards which the cone faces, see the PhysicsSpace.AXIS_* constants.public ConeCollisionShape(float radius, float height)
radius
- The radius of the cone in world units.height
- The height of the cone in world units.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()