com.jme3.bullet.collision.shapes
Class CylinderCollisionShape

java.lang.Object
  extended by com.jme3.bullet.collision.shapes.CollisionShape
      extended by com.jme3.bullet.collision.shapes.CylinderCollisionShape
All Implemented Interfaces:
Savable

public class CylinderCollisionShape
extends CollisionShape

Basic cylinder collision shape


Field Summary
protected  int axis
           
protected  Vector3f halfExtents
           
 
Fields inherited from class com.jme3.bullet.collision.shapes.CollisionShape
margin, objectId, scale
 
Constructor Summary
CylinderCollisionShape()
           
CylinderCollisionShape(Vector3f halfExtents)
          creates a cylinder shape from the given halfextents
CylinderCollisionShape(Vector3f halfExtents, int axis)
          Creates a cylinder shape around the given axis from the given halfextents
 
Method Summary
protected  void createShape()
           
 int getAxis()
           
 Vector3f getHalfExtents()
           
 void read(JmeImporter im)
           
 void write(JmeExporter ex)
           
 
Methods inherited from class com.jme3.bullet.collision.shapes.CollisionShape
finalize, getMargin, getObjectId, getScale, setMargin, setObjectId, setScale
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

halfExtents

protected Vector3f halfExtents

axis

protected int axis
Constructor Detail

CylinderCollisionShape

public CylinderCollisionShape()

CylinderCollisionShape

public CylinderCollisionShape(Vector3f halfExtents)
creates a cylinder shape from the given halfextents

Parameters:
halfExtents - the halfextents to use

CylinderCollisionShape

public CylinderCollisionShape(Vector3f halfExtents,
                              int axis)
Creates a cylinder shape around the given axis from the given halfextents

Parameters:
halfExtents - the halfextents to use
axis - (0=X,1=Y,2=Z)
Method Detail

getHalfExtents

public final Vector3f getHalfExtents()

getAxis

public int getAxis()

write

public void write(JmeExporter ex)
           throws java.io.IOException
Specified by:
write in interface Savable
Overrides:
write in class CollisionShape
Throws:
java.io.IOException

read

public void read(JmeImporter im)
          throws java.io.IOException
Specified by:
read in interface Savable
Overrides:
read in class CollisionShape
Throws:
java.io.IOException

createShape

protected void createShape()