shout3d.core
Class Cylinder

java.lang.Object
  |
  +--shout3d.core.Node
        |
        +--shout3d.core.Geometry
              |
              +--shout3d.core.Mesh
                    |
                    +--shout3d.core.S3DMesh
                          |
                          +--shout3d.core.IndexedFaceSet
                                |
                                +--shout3d.core.Cylinder

public class Cylinder
extends IndexedFaceSet
implements FieldObserver

Cylinder. Subclass of IndexedFaceSet Adds 6 fields -- radius, height, side, top, and bottom. -- radius sets the radius of the cylinder. -- height sets the height of the cylinder. -- side is a boolean -- if TRUE (default) then the sides are displayed, else they are not. -- bottom is a boolean -- if TRUE (default) then the bottom circle is displayed, else it is not. -- top is a boolean -- if TRUE (default) then the top circle is displayed, else it is not. -- numSides is an int -- the number of panels around the sides of the cylinder. When any of these changes, the Cylinder recalculates the vertices of its geometry.


Field Summary
 BooleanField bottom
           
 FloatField height
           
 IntField numSides
           
 FloatField radius
           
 BooleanField side
           
 BooleanField top
           
 
Fields inherited from class shout3d.core.IndexedFaceSet
creaseAngle, solid, texCoord, texCoordIndex
 
Fields inherited from class shout3d.core.S3DMesh
ccw, color, colorIndex, colorPerVertex, coord, coordIndex
 
Constructor Summary
Cylinder()
          Constructs a default Cylinder
 
Method Summary
 void onFieldChange(Field theField, java.lang.Object userData)
          Subclasses must call this from within their own onFieldChange() method.
 
Methods inherited from class shout3d.core.Node
cleanUp, getDEFName, getField, getFieldByIndex, getFieldName, getNumFields, getTypeName, getViewer, isOfType, setDEFName, setViewer
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

radius

public final FloatField radius

height

public final FloatField height

side

public final BooleanField side

bottom

public final BooleanField bottom

top

public final BooleanField top

numSides

public final IntField numSides
Constructor Detail

Cylinder

public Cylinder()
Constructs a default Cylinder
Method Detail

onFieldChange

public void onFieldChange(Field theField,
                          java.lang.Object userData)
Subclasses must call this from within their own onFieldChange() method.
Specified by:
onFieldChange in interface FieldObserver
Overrides:
onFieldChange in class IndexedFaceSet