org.odejava
Class GeomCapsule

java.lang.Object
  extended by org.odejava.Geom
      extended by org.odejava.PlaceableGeom
          extended by org.odejava.GeomCapsule
All Implemented Interfaces:
Placeable

public class GeomCapsule
extends PlaceableGeom

Capped cylinder is like a normal cylinder except it has half-sphere caps at its ends. This feature makes the internal collision detection code particularly fast and accurate. The cylinder's length, not counting the caps, is given by length. The cylinder is aligned along the geom's local Z axis. The radius of the caps, and of the cylinder itself, is given by radius. Created 16.12.2003 (dd.mm.yyyy)

Author:
Jani Laakso E-mail: jani.laakso@itmill.com see http://odejava.dev.java.net

Field Summary
 
Fields inherited from class org.odejava.Geom
geomId, isEncapsulated, spaceId
 
Constructor Summary
GeomCapsule(float radius, float length)
           
GeomCapsule(String name, float radius, float length)
          Create capped cylinder geometry to specific space.
 
Method Summary
 float getLength()
          Get capped cylinder length.
 float getRadius()
          Get capped cylinder radius.
 
Methods inherited from class org.odejava.PlaceableGeom
delete, fixed, getAxisAngle, getAxisAngle, getBody, getPosition, getPosition, getPosition, getQuaternion, getQuaternion, getRotation, setAxisAndAngle, setAxisAndAngle, setBody, setPosition, setPosition, setQuaternion, setQuatWXYZ, setRotation
 
Methods inherited from class org.odejava.Geom
addToSpace, finalize, getGeomFromNativeAddr, getId, getID, getName, getNativeAddr, getUserData, isEnabled, removeFromSpace, setCategoryBits, setCollideBits, setEnabled, setName, setUserData, updateNativeAddr
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.odejava.Placeable
getName
 

Constructor Detail

GeomCapsule

public GeomCapsule(String name,
                   float radius,
                   float length)
Create capped cylinder geometry to specific space.

Parameters:
name -
radius -
length -

GeomCapsule

public GeomCapsule(float radius,
                   float length)
Method Detail

getRadius

public float getRadius()
Get capped cylinder radius.

Returns:
radius

getLength

public float getLength()
Get capped cylinder length.

Returns:
length