shout3d.core
Class ElevationGrid

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

public class ElevationGrid
extends IndexedFaceSet
implements FieldObserver

ElevationGrid. Subclass of IndexedFaceSet Adds fields that define an ElevationGrid When any of these changes, retesselates the geometry and sets the base class IndexedFaceSet fields. Always sets the coord and coordIndex. If the color/colorPerVertex is set and has the right number of entries, sets colorIndex Always leaves texCoordIndex null and sets texCoord values to correspond to same indexed coord, so that the default texCoordIndex will be chosen to match the coordIndex values. If the texCoord is not set (or set to wrong number) generates default texCoord


Field Summary
 float[] defaultHeight
           
 FloatArrayField height
           
 IntField xDimension
           
 FloatField xSpacing
           
 IntField zDimension
           
 FloatField zSpacing
           
 
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
ElevationGrid()
          Constructs a default ElevationGrid
 
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

defaultHeight

public final float[] defaultHeight

height

public final FloatArrayField height

xDimension

public final IntField xDimension

xSpacing

public final FloatField xSpacing

zDimension

public final IntField zDimension

zSpacing

public final FloatField zSpacing
Constructor Detail

ElevationGrid

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