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:
com.jme3.export.Savable
Basic cylinder collision shape
- Author:
- normenhansen
-
Field Summary
FieldsFields inherited from class com.jme3.bullet.collision.shapes.CollisionShape
cShape, margin, scale -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCylinderCollisionShape(com.jme3.math.Vector3f halfExtents) creates a cylinder shape from the given halfextentsCylinderCollisionShape(com.jme3.math.Vector3f halfExtents, int axis) Creates a cylinder shape around the given axis from the given halfextents -
Method Summary
Methods inherited from class com.jme3.bullet.collision.shapes.CollisionShape
calculateLocalInertia, getCShape, getDefaultMargin, getMargin, getScale, setCShape, setDefaultMargin, setMargin
-
Field Details
-
halfExtents
protected com.jme3.math.Vector3f halfExtents -
axis
protected int axis
-
-
Constructor Details
-
CylinderCollisionShape
protected CylinderCollisionShape() -
CylinderCollisionShape
public CylinderCollisionShape(com.jme3.math.Vector3f halfExtents) creates a cylinder shape from the given halfextents- Parameters:
halfExtents- the halfextents to use
-
CylinderCollisionShape
public CylinderCollisionShape(com.jme3.math.Vector3f halfExtents, int axis) 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
public final com.jme3.math.Vector3f getHalfExtents() -
getAxis
public int getAxis() -
setScale
public void setScale(com.jme3.math.Vector3f scale) WARNING - CompoundCollisionShape scaling has no effect.- Overrides:
setScalein classCollisionShape
-
write
- Specified by:
writein interfacecom.jme3.export.Savable- Overrides:
writein classCollisionShape- Throws:
IOException
-
read
- Specified by:
readin interfacecom.jme3.export.Savable- Overrides:
readin classCollisionShape- Throws:
IOException
-
createShape
protected void createShape()
-