public class CylinderCollisionShape extends CollisionShape
| Modifier and Type | Field and Description | 
|---|---|
protected int | 
axis
copy of main (height) axis (0→X, 1→Y, 2→Z) 
 | 
protected Vector3f | 
halfExtents
copy of half-extents of the cylinder on each local axis (not null, no
 negative component) 
 | 
margin, objectId, scale| Modifier | Constructor and Description | 
|---|---|
protected  | 
CylinderCollisionShape()
No-argument constructor needed by SavableClassUtil. 
 | 
  | 
CylinderCollisionShape(Vector3f halfExtents)
Instantiate a Z-axis cylinder shape with the specified half extents. 
 | 
  | 
CylinderCollisionShape(Vector3f halfExtents,
                      int axis)
Instantiate a cylinder shape around the specified axis. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
createShape()
Instantiate the configured shape in Bullet. 
 | 
int | 
getAxis()
Determine the main axis of the cylinder. 
 | 
Vector3f | 
getHalfExtents()
Access the half extents of the cylinder. 
 | 
void | 
read(JmeImporter im)
De-serialize this shape, for example when loading from a J3O file. 
 | 
void | 
setScale(Vector3f scale)
Alter the scaling factors of this shape. 
 | 
void | 
write(JmeExporter ex)
Serialize this shape, for example when saving to a J3O file. 
 | 
finalize, getDefaultMargin, getMargin, getObjectId, getScale, isNonMoving, setDefaultMargin, setMargin, setObjectIdprotected Vector3f halfExtents
protected int axis
protected CylinderCollisionShape()
public CylinderCollisionShape(Vector3f halfExtents)
halfExtents - the desired unscaled half extents (not null, no
 negative component, alias created)public CylinderCollisionShape(Vector3f halfExtents, int axis)
halfExtents - the desired unscaled half extents (not null, no 
 negative component, alias created)axis - which local axis: 0→X, 1→Y, 2→Zpublic final Vector3f getHalfExtents()
public int getAxis()
public void setScale(Vector3f scale)
setScale in class CollisionShapescale - the desired scaling factor for each local axis (not null, no
 negative component, unaffected, default=1,1,1)public void write(JmeExporter ex) throws java.io.IOException
write in interface Savablewrite in class CollisionShapeex - exporter (not null)java.io.IOException - from exporterpublic void read(JmeImporter im) throws java.io.IOException
read in interface Savableread in class CollisionShapeim - importer (not null)java.io.IOException - from importerprotected void createShape()