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 SummaryFieldsModifier and TypeFieldDescriptionprotected intprotected floatprotected floatFields inherited from class com.jme3.bullet.collision.shapes.CollisionShapecShape, margin, scale
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedSerialization 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 SummaryModifier and TypeMethodDescriptionprotected voidintgetAxis()floatfloatvoidread(JmeImporter im) voidwrite(JmeExporter ex) Methods inherited from class com.jme3.bullet.collision.shapes.CollisionShapecalculateLocalInertia, getCShape, getDefaultMargin, getMargin, getScale, setCShape, setDefaultMargin, setMargin, setScale
- 
Field Details- 
radiusprotected float radius
- 
heightprotected float height
- 
axisprotected int axis
 
- 
- 
Constructor Details- 
ConeCollisionShapeprotected ConeCollisionShape()Serialization only, do not use.
- 
ConeCollisionShapepublic 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.
 
- 
ConeCollisionShapepublic 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- 
getRadiuspublic float getRadius()
- 
getHeightpublic float getHeight()
- 
getAxispublic int getAxis()
- 
write- Specified by:
- writein interface- Savable
- Overrides:
- writein class- CollisionShape
- Throws:
- IOException
 
- 
read- Specified by:
- readin interface- Savable
- Overrides:
- readin class- CollisionShape
- Throws:
- IOException
 
- 
createShapeprotected void createShape()
 
-