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
FieldsModifier and TypeFieldDescriptionprotected intprotected floatprotected floatFields inherited from class com.jme3.bullet.collision.shapes.CollisionShape
cShape, margin, scale -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSerialization 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 voidintgetAxis()floatfloatvoidread(JmeImporter im) voidwrite(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:
writein interfaceSavable- Overrides:
writein classCollisionShape- Throws:
IOException
-
read
- Specified by:
readin interfaceSavable- Overrides:
readin classCollisionShape- Throws:
IOException
-
createShape
protected void createShape()
-