shout3d.core
Class Sphere

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

public class Sphere
extends IndexedFaceSet
implements FieldObserver

Sphere. Subclass of IndexedFaceSet Adds three fields -- radius, which must be greater than 0. -- numSidesU, the number of sides going around the Y axis (corresponds to longitudinal divisions) -- numSidesV, the number of sides vertically along the Y axix (corresponds to latitudinal divisions) When these fields change, the Sphere recalculates the vertices of its geometry.


Field Summary
 IntField numSidesU
           
 IntField numSidesV
           
 FloatField radius
           
 
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
Sphere()
          Constructs a default Sphere
 
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

numSidesU

public final IntField numSidesU

numSidesV

public final IntField numSidesV
Constructor Detail

Sphere

public Sphere()
Constructs a default Sphere
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