Package com.jme3.bullet.collision.shapes
Class CylinderCollisionShape
java.lang.Object
com.jme3.bullet.collision.shapes.CollisionShape
com.jme3.bullet.collision.shapes.CylinderCollisionShape
- All Implemented Interfaces:
Savable
Basic cylinder collision shape
-
Field Summary
Fields inherited from class com.jme3.bullet.collision.shapes.CollisionShape
cShape, margin, scale
-
Constructor Summary
ModifierConstructorDescriptionprotected
CylinderCollisionShape
(Vector3f halfExtents) creates a cylinder shape from the given halfextentsCylinderCollisionShape
(Vector3f halfExtents, int axis) Creates a cylinder shape around the given axis from the given halfextents -
Method Summary
Modifier and TypeMethodDescriptionprotected void
int
getAxis()
final Vector3f
void
read
(JmeImporter im) void
WARNING - CompoundCollisionShape scaling has no effect.void
write
(JmeExporter ex) Methods inherited from class com.jme3.bullet.collision.shapes.CollisionShape
calculateLocalInertia, getCShape, getDefaultMargin, getMargin, getScale, setCShape, setDefaultMargin, setMargin
-
Field Details
-
halfExtents
-
axis
protected int axis
-
-
Constructor Details
-
CylinderCollisionShape
protected CylinderCollisionShape() -
CylinderCollisionShape
creates a cylinder shape from the given halfextents- Parameters:
halfExtents
- the halfextents to use
-
CylinderCollisionShape
Creates a cylinder shape around the given axis from the given halfextents- Parameters:
halfExtents
- the halfextents to useaxis
- (0=X,1=Y,2=Z)
-
-
Method Details
-
getHalfExtents
-
getAxis
public int getAxis() -
setScale
WARNING - CompoundCollisionShape scaling has no effect.- Overrides:
setScale
in classCollisionShape
-
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()
-