Package com.jme3.bullet.collision.shapes
Class ConeCollisionShape
java.lang.Object
com.jme3.bullet.collision.shapes.CollisionShape
com.jme3.bullet.collision.shapes.ConeCollisionShape
- All Implemented Interfaces:
Savable
Cone collision shape represents a 3D cone with a radius, height, and axis (X, Y or Z).
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
protected float
protected float
Fields inherited from class com.jme3.bullet.collision.shapes.CollisionShape
cShape, margin, scale
-
Constructor Summary
ModifierConstructorDescriptionprotected
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. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
int
getAxis()
float
float
void
read
(JmeImporter im) void
write
(JmeExporter ex) Methods inherited from class com.jme3.bullet.collision.shapes.CollisionShape
calculateLocalInertia, getCShape, getDefaultMargin, getMargin, getScale, setCShape, setDefaultMargin, setMargin, setScale
-
Field Details
-
radius
protected float radius -
height
protected float height -
axis
protected int axis
-
-
Constructor Details
-
ConeCollisionShape
protected ConeCollisionShape()Serialization only, do not use. -
ConeCollisionShape
public ConeCollisionShape(float radius, float height, int axis) Creates a new cone collision shape with the given height, radius, and axis.- Parameters:
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.
-
ConeCollisionShape
public ConeCollisionShape(float radius, float height) Creates a new cone collision shape with the given height, radius and default Y axis.- Parameters:
radius
- The radius of the cone in world units.height
- The height of the cone in world units.
-
-
Method Details
-
getRadius
public float getRadius() -
getHeight
public float getHeight() -
getAxis
public int getAxis() -
write
- Specified by:
write
in interfaceSavable
- Overrides:
write
in classCollisionShape
- Throws:
IOException
-
read
- Specified by:
read
in interfaceSavable
- Overrides:
read
in classCollisionShape
- Throws:
IOException
-
createShape
protected void createShape()
-