com.jme3.bullet.collision.shapes
Class CapsuleCollisionShape

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

public class CapsuleCollisionShape
extends CollisionShape

Basic capsule collision shape


Field Summary
protected  int axis
           
protected  float height
           
protected  float radius
           
 
Fields inherited from class com.jme3.bullet.collision.shapes.CollisionShape
margin, objectId, scale
 
Constructor Summary
CapsuleCollisionShape()
           
CapsuleCollisionShape(float radius, float height)
          creates a new CapsuleCollisionShape with the given radius and height
CapsuleCollisionShape(float radius, float height, int axis)
          creates a capsule shape around the given axis (0=X,1=Y,2=Z)
 
Method Summary
protected  void createShape()
           
 int getAxis()
           
 float getHeight()
           
 float getRadius()
           
 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

radius

protected float radius

height

protected float height

axis

protected int axis
Constructor Detail

CapsuleCollisionShape

public CapsuleCollisionShape()

CapsuleCollisionShape

public CapsuleCollisionShape(float radius,
                             float height)
creates a new CapsuleCollisionShape with the given radius and height

Parameters:
radius - the radius of the capsule
height - the height of the capsule

CapsuleCollisionShape

public CapsuleCollisionShape(float radius,
                             float height,
                             int axis)
creates a capsule shape around the given axis (0=X,1=Y,2=Z)

Parameters:
radius -
height -
axis -
Method Detail

getRadius

public float getRadius()

getHeight

public float getHeight()

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()