org.xith3d.scenegraph.primitives
Class Capsule

java.lang.Object
  extended by org.xith3d.scenegraph.SceneGraphObject
      extended by org.xith3d.scenegraph.Node
          extended by org.xith3d.scenegraph.Leaf
              extended by org.xith3d.scenegraph.Shape3D
                  extended by org.xith3d.scenegraph.primitives.Capsule
All Implemented Interfaces:
org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.openmali.spatial.SpatialNode

public class Capsule
extends Shape3D

A simple Capsule Shape3D.

The length of the Capsule is the length of the body (without the caps).
The radius is the radius of the body and the caps.


Field Summary
 
Fields inherited from class org.xith3d.scenegraph.Node
bounds, boundsAutoCompute, boundsDirty, globalIgnoreBounds, instanceBoundsTypeHint, transformGroup, untransformedBounds
 
Fields inherited from class org.xith3d.scenegraph.SceneGraphObject
XITH3D_USERDATAKEY_OLDUSERDATA
 
Constructor Summary
Capsule(float radius, float length, int slices, int stacks, Appearance app)
          Creates a capsule using standard specifications.
Capsule(float radius, float length, int slices, int stacks, org.openmali.vecmath2.Colorf color)
          Creates a capsule using standard specifications.
Capsule(float radius, float length, int slices, int stacks, int features, boolean colorAlpha, int texCoordsSize)
          Creates a capsule using standard specifications.
Capsule(float radius, float length, int slices, int stacks, java.lang.String texture)
          Creates a capsule using standard specifications.
Capsule(float radius, float length, int slices, int stacks, Texture texture)
          Creates a capsule using standard specifications.
Capsule(int slices, int stacks, Appearance app)
          Creates a capsule using standard specifications.
Capsule(int slices, int stacks, org.openmali.vecmath2.Colorf color)
          Creates a capsule using standard specifications.
Capsule(int slices, int stacks, int features, boolean colorAlpha, int texCoordsSize)
          Creates a capsule using standard specifications.
Capsule(int slices, int stacks, java.lang.String texture)
          Creates a capsule using standard specifications.
Capsule(int slices, int stacks, Texture texture)
          Creates a capsule using standard specifications.
 
Method Summary
static Geometry createGeometry(int slices, int stacks, float radius, float length, int features, boolean colorAlpha, int texCoordsSize)
           
static GeometryConstruct createGeometryConstructTA(int slices, int stacks, float radius, float length, int features, boolean colorAlpha, int texCoordsSize)
          Creates the GeometryConstruct for a Capsule.
static TriangleArray createGeometryTA(int slices, int stacks, float radius, float length, int features, boolean colorAlpha, int texCoordsSize)
          Creates the Geometry for a Capsule.
static GeometryType getGeometryConstructionTypeHint()
           
static void setGeometryConstructionTypeHint(GeometryType hint)
          Sets the hint for this ShapeType's Geometry to be constructed of a certain type.
 
Methods inherited from class org.xith3d.scenegraph.Shape3D
absorbDetails, copy, freeOpenGLResources, getAppearance, getAppearance, getCustomComparable, getGeometry, isBumpMappingEnabled, isShadowReceiver, isVisible, newAppearance, newInstance, setAppearance, setBounds, setBumpMappingEnabled, setBumpMappingEnabled, setCustomComparable, setGeometry, setIsShadowReceiver, setModListener, setVisible, sharedCopy, sharedCopy, traverse, updateBounds, updateBoundsCheap, updateWorldTransform, verifyAppChange
 
Methods inherited from class org.xith3d.scenegraph.Leaf
dump, getPickHost, setPickHost
 
Methods inherited from class org.xith3d.scenegraph.Node
cloneNode, detach, duplicateNode, freeOpenGLResources, getBounds, getBoundsAutoCompute, getBoundsType, getBoundsTypeHint, getDefaultPickable, getIndentString, getInheritedNodeAttributes, getModListener, getOrderedChild, getOrderedState, getParent, getRoot, getShadowAttachment, getShowBounds, getTransformGroup, getTreeCell, getWorldBounds, getWorldTransform, getWorldTransform, isBillboard, isIgnoreBounds, isOccluder, isPickable, isRenderable, isUpdatableNode, mergeInheritedClipper, mergeInheritedNodes, mergeInheritedScissorRect, popGlobalIgnoreBounds, printBounds, pushGlobalIgnoreBounds, setBoundsAutoCompute, setBoundsDirty, setBoundsDirtyUpward, setBoundsTypeHint, setDefaultPickable, setGlobalIgnoreBounds, setIgnoreBounds, setIsOccluder, setOrderedChild, setParent, setPickable, setPickableRecursive, setPickableRecursive, setRenderable, setShadowAttachment, setShowBounds, setTransformGroup, setTreeCell, traverse, unmergeInheritedFog, unmergeInheritedLight, unmergeInheritedNodes, updateOrderedChild, updateTransformGroup
 
Methods inherited from class org.xith3d.scenegraph.SceneGraphObject
getName, getUserData, getUserData, getUserDataMap, isLive, setLive, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Capsule

public Capsule(int slices,
               int stacks,
               int features,
               boolean colorAlpha,
               int texCoordsSize)
Creates a capsule using standard specifications.

Parameters:
slices - the slices of the cap Hemispheres and the body Cylinder
stacks - the stacks of each cap Hemisphere.
features - Generate the data for GeometryArray.COLOR_3 | GeometryArray.NORMALS | ...
colorAlpha -
texCoordsSize -

Capsule

public Capsule(float radius,
               float length,
               int slices,
               int stacks,
               int features,
               boolean colorAlpha,
               int texCoordsSize)
Creates a capsule using standard specifications.

Parameters:
radius - the radius of the capsule
length - the length of the body Cylinder
slices - the slices of the cap Hemispheres and the body Cylinder
stacks - the stacks of each cap Hemisphere.
features - Generate the data for GeometryArray.COLOR_3 | GeometryArray.NORMALS | ...
colorAlpha -
texCoordsSize -

Capsule

public Capsule(float radius,
               float length,
               int slices,
               int stacks,
               Texture texture)
Creates a capsule using standard specifications.

Parameters:
radius - the radius of the capsule
length - the length of the body Cylinder
slices - the slices of the cap Hemispheres and the body Cylinder
stacks - the stacks of each cap Hemisphere.
texture - the texture to apply to the Sphere's Appearance

Capsule

public Capsule(int slices,
               int stacks,
               Texture texture)
Creates a capsule using standard specifications.

Parameters:
slices - the slices of the cap Hemispheres and the body Cylinder
stacks - the stacks of each cap Hemisphere.
texture - the texture to apply to the Sphere's Appearance

Capsule

public Capsule(float radius,
               float length,
               int slices,
               int stacks,
               java.lang.String texture)
Creates a capsule using standard specifications.

Parameters:
radius - the radius of the capsule
length - the length of the body Cylinder
slices - the slices of the cap Hemispheres and the body Cylinder
stacks - the stacks of each cap Hemisphere.
texture - the texture to apply to the Sphere's Appearance

Capsule

public Capsule(int slices,
               int stacks,
               java.lang.String texture)
Creates a capsule using standard specifications.

Parameters:
slices - the slices of the cap Hemispheres and the body Cylinder
stacks - the stacks of each cap Hemisphere.
texture - the texture to apply to the Sphere's Appearance

Capsule

public Capsule(float radius,
               float length,
               int slices,
               int stacks,
               org.openmali.vecmath2.Colorf color)
Creates a capsule using standard specifications.

Parameters:
radius - the radius of the capsule
length - the length of the body Cylinder
slices - the slices of the cap Hemispheres and the body Cylinder
stacks - the stacks of each cap Hemisphere.
color - the color to apply to the Sphere's Appearance

Capsule

public Capsule(int slices,
               int stacks,
               org.openmali.vecmath2.Colorf color)
Creates a capsule using standard specifications.

Parameters:
slices - the slices of the cap Hemispheres and the body Cylinder
stacks - the stacks of each cap Hemisphere.
color - the color to apply to the Sphere's Appearance

Capsule

public Capsule(float radius,
               float length,
               int slices,
               int stacks,
               Appearance app)
Creates a capsule using standard specifications.

Parameters:
radius - the radius of the capsule
length - the length of the body Cylinder
slices - the slices of the cap Hemispheres and the body Cylinder
stacks - the stacks of each cap Hemisphere.
app - the Appearance to be applied to this Shape

Capsule

public Capsule(int slices,
               int stacks,
               Appearance app)
Creates a capsule using standard specifications.

Parameters:
slices - the slices of the cap Hemispheres and the body Cylinder
stacks - the stacks of each cap Hemisphere.
app - the Appearance to be applied to this Shape
Method Detail

setGeometryConstructionTypeHint

public static void setGeometryConstructionTypeHint(GeometryType hint)
Sets the hint for this ShapeType's Geometry to be constructed of a certain type.

Parameters:
hint -

getGeometryConstructionTypeHint

public static GeometryType getGeometryConstructionTypeHint()
Returns:
the hint for this ShapeType's Geometry to be constructed of a certain type.

createGeometryConstructTA

public static GeometryConstruct createGeometryConstructTA(int slices,
                                                          int stacks,
                                                          float radius,
                                                          float length,
                                                          int features,
                                                          boolean colorAlpha,
                                                          int texCoordsSize)
Creates the GeometryConstruct for a Capsule.

Parameters:
slices - the slices of the cap Hemispheres and the body Cylinder
stacks - the stacks of each cap Hemisphere.
radius - the radius of the capsule
length - the length of the body Cylinder
features - the Geometry features
colorAlpha -
texCoordsSize -
Returns:
the GeometryConstruct for a Hemisphere

createGeometryTA

public static TriangleArray createGeometryTA(int slices,
                                             int stacks,
                                             float radius,
                                             float length,
                                             int features,
                                             boolean colorAlpha,
                                             int texCoordsSize)
Creates the Geometry for a Capsule.

Parameters:
slices - the slices of the cap Hemispheres and the body Cylinder
stacks - the stacks of each cap Hemisphere.
radius - the radius of the capsule
length - the length of the body Cylinder
features - the Geometry features
colorAlpha -
texCoordsSize -
Returns:
the GeometryConstruct for a Hemisphere

createGeometry

public static Geometry createGeometry(int slices,
                                      int stacks,
                                      float radius,
                                      float length,
                                      int features,
                                      boolean colorAlpha,
                                      int texCoordsSize)