org.xith3d.scenegraph.primitives
Class Grid

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.Grid
All Implemented Interfaces:
org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.openmali.spatial.SpatialNode

public class Grid
extends Shape3D

This is a simple implementation of a homogenous vertex/triangle grid.


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
Grid(float width, float height, int resX, int resY, Appearance app)
          Creates a new Raster Shape3D.
Grid(float width, float height, int resX, int resY, org.openmali.vecmath2.Colorf color)
          Creates a new Raster Shape3D.
Grid(float width, float height, int resX, int resY, int features, boolean colorAlpha, int texCoordsSize)
          Creates a new Raster Shape3D.
Grid(float width, float height, int resX, int resY, java.lang.String texture)
          Creates a new Raster Shape3D.
Grid(float width, float height, int resX, int resY, Texture texture)
          Creates a new Raster Shape3D.
 
Method Summary
static Geometry createGeometry(float width, float height, int resX, int resY, int features, boolean colorAlpha, int texCoordsSize)
          Creates a GeometryArray for a Raster Shape3D.
static GeometryConstruct createGeometryConstructITA(float width, float height, int resX, int resY, int features, boolean colorAlpha, int texCoordsSize)
          Creates a GeometryConstruct for an IndexedTriangleArray for a Raster Shape3D.
static GeometryConstruct createGeometryConstructITSA(float width, float height, int resX, int resY, int features, boolean colorAlpha, int texCoordsSize)
          Creates a GeometryConstruct for an IndexedTriangleStripArray for a Raster Shape3D.
static GeometryConstruct createGeometryConstructTA(float width, float height, int resX, int resY, int features, boolean colorAlpha, int texCoordsSize)
          Creates a GeometryConstruct for a TriangleArray for a Raster Shape3D.
static GeometryConstruct createGeometryConstructTSA(float width, float height, int resX, int resY, int features, boolean colorAlpha, int texCoordsSize)
          Creates a GeometryConstruct for a TriangleStripArray for a Raster Shape3D.
static IndexedTriangleArray createGeometryITA(float width, float height, int resX, int resY, int features, boolean colorAlpha, int texCoordsSize)
          Creates an IndexedTriangleArray for a Raster Shape3D.
static IndexedTriangleStripArray createGeometryITSA(float width, float height, int resX, int resY, int features, boolean colorAlpha, int texCoordsSize)
          Creates an IndexedTriangleStripArray for a Raster Shape3D.
static TriangleArray createGeometryTA(float width, float height, int resX, int resY, int features, boolean colorAlpha, int texCoordsSize)
          Creates a TriangleArray for a Raster Shape3D.
static TriangleStripArray createGeometryTSA(float width, float height, int resX, int resY, int features, boolean colorAlpha, int texCoordsSize)
          Creates a TriangleStripArray for a Raster Shape3D.
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

Grid

public Grid(float width,
            float height,
            int resX,
            int resY,
            int features,
            boolean colorAlpha,
            int texCoordsSize)
Creates a new Raster Shape3D.

Parameters:
width - the absolute width of the whole Raster
height - the absolute height of the Whole Raster
resX - the x-resolution of the Raster (number of rectangles)
resY - the y-resolution of the Raster (number of rectangles)
features - the GeometryArray features
colorAlpha -
texCoordsSize -

Grid

public Grid(float width,
            float height,
            int resX,
            int resY,
            Texture texture)
Creates a new Raster Shape3D.

Parameters:
width - the absolute width of the whole Raster
height - the absolute height of the Whole Raster
resX - the x-resolution of the Raster (number of rectangles)
resY - the y-resolution of the Raster (number of rectangles)
texture - the texture to be applied

Grid

public Grid(float width,
            float height,
            int resX,
            int resY,
            java.lang.String texture)
Creates a new Raster Shape3D.

Parameters:
width - the absolute width of the whole Raster
height - the absolute height of the Whole Raster
resX - the x-resolution of the Raster (number of rectangles)
resY - the y-resolution of the Raster (number of rectangles)
texture - the texture to be applied

Grid

public Grid(float width,
            float height,
            int resX,
            int resY,
            org.openmali.vecmath2.Colorf color)
Creates a new Raster Shape3D.

Parameters:
width - the absolute width of the whole Raster
height - the absolute height of the Whole Raster
resX - the x-resolution of the Raster (number of rectangles)
resY - the y-resolution of the Raster (number of rectangles)
color - the color to be applied to the shape's ColoringAttributes

Grid

public Grid(float width,
            float height,
            int resX,
            int resY,
            Appearance app)
Creates a new Raster Shape3D.

Parameters:
width - the absolute width of the whole Raster
height - the absolute height of the Whole Raster
resX - the x-resolution of the Raster (number of rectangles)
resY - the y-resolution of the Raster (number of rectangles)
app - the Appearance to be applied to the 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.

createGeometryConstructITSA

public static GeometryConstruct createGeometryConstructITSA(float width,
                                                            float height,
                                                            int resX,
                                                            int resY,
                                                            int features,
                                                            boolean colorAlpha,
                                                            int texCoordsSize)
Creates a GeometryConstruct for an IndexedTriangleStripArray for a Raster Shape3D.

Parameters:
width - the absolute width of the whole Raster
height - the absolute height of the Whole Raster
resX - the x-resolution of the Raster (number of rectangles)
resY - the y-resolution of the Raster (number of rectangles)
features - the GeometryArray features
colorAlpha -
texCoordsSize -

createGeometryITSA

public static IndexedTriangleStripArray createGeometryITSA(float width,
                                                           float height,
                                                           int resX,
                                                           int resY,
                                                           int features,
                                                           boolean colorAlpha,
                                                           int texCoordsSize)
Creates an IndexedTriangleStripArray for a Raster Shape3D.

Parameters:
width - the absolute width of the whole Raster
height - the absolute height of the Whole Raster
resX - the x-resolution of the Raster (number of rectangles)
resY - the y-resolution of the Raster (number of rectangles)
features - the GeometryArray features
colorAlpha -
texCoordsSize -

createGeometryConstructITA

public static GeometryConstruct createGeometryConstructITA(float width,
                                                           float height,
                                                           int resX,
                                                           int resY,
                                                           int features,
                                                           boolean colorAlpha,
                                                           int texCoordsSize)
Creates a GeometryConstruct for an IndexedTriangleArray for a Raster Shape3D.

Parameters:
width - the absolute width of the whole Raster
height - the absolute height of the Whole Raster
resX - the x-resolution of the Raster (number of rectangles)
resY - the y-resolution of the Raster (number of rectangles)
features - the GeometryArray features
colorAlpha -
texCoordsSize -

createGeometryITA

public static IndexedTriangleArray createGeometryITA(float width,
                                                     float height,
                                                     int resX,
                                                     int resY,
                                                     int features,
                                                     boolean colorAlpha,
                                                     int texCoordsSize)
Creates an IndexedTriangleArray for a Raster Shape3D.

Parameters:
width - the absolute width of the whole Raster
height - the absolute height of the Whole Raster
resX - the x-resolution of the Raster (number of rectangles)
resY - the y-resolution of the Raster (number of rectangles)
features - the GeometryArray features
colorAlpha -
texCoordsSize -

createGeometryConstructTSA

public static GeometryConstruct createGeometryConstructTSA(float width,
                                                           float height,
                                                           int resX,
                                                           int resY,
                                                           int features,
                                                           boolean colorAlpha,
                                                           int texCoordsSize)
Creates a GeometryConstruct for a TriangleStripArray for a Raster Shape3D.

Parameters:
width - the absolute width of the whole Raster
height - the absolute height of the Whole Raster
resX - the x-resolution of the Raster (number of rectangles)
resY - the y-resolution of the Raster (number of rectangles)
features - the GeometryArray features
colorAlpha -
texCoordsSize -

createGeometryTSA

public static TriangleStripArray createGeometryTSA(float width,
                                                   float height,
                                                   int resX,
                                                   int resY,
                                                   int features,
                                                   boolean colorAlpha,
                                                   int texCoordsSize)
Creates a TriangleStripArray for a Raster Shape3D.

Parameters:
width - the absolute width of the whole Raster
height - the absolute height of the Whole Raster
resX - the x-resolution of the Raster (number of rectangles)
resY - the y-resolution of the Raster (number of rectangles)
features - the GeometryArray features
colorAlpha -
texCoordsSize -

createGeometryConstructTA

public static GeometryConstruct createGeometryConstructTA(float width,
                                                          float height,
                                                          int resX,
                                                          int resY,
                                                          int features,
                                                          boolean colorAlpha,
                                                          int texCoordsSize)
Creates a GeometryConstruct for a TriangleArray for a Raster Shape3D.

Parameters:
width - the absolute width of the whole Raster
height - the absolute height of the Whole Raster
resX - the x-resolution of the Raster (number of rectangles)
resY - the y-resolution of the Raster (number of rectangles)
features - the GeometryArray features
colorAlpha -
texCoordsSize -

createGeometryTA

public static TriangleArray createGeometryTA(float width,
                                             float height,
                                             int resX,
                                             int resY,
                                             int features,
                                             boolean colorAlpha,
                                             int texCoordsSize)
Creates a TriangleArray for a Raster Shape3D.

Parameters:
width - the absolute width of the whole Raster
height - the absolute height of the Whole Raster
resX - the x-resolution of the Raster (number of rectangles)
resY - the y-resolution of the Raster (number of rectangles)
features - the GeometryArray features
colorAlpha -
texCoordsSize -

createGeometry

public static Geometry createGeometry(float width,
                                      float height,
                                      int resX,
                                      int resY,
                                      int features,
                                      boolean colorAlpha,
                                      int texCoordsSize)
Creates a GeometryArray for a Raster Shape3D.

Parameters:
width - the absolute width of the whole Raster
height - the absolute height of the Whole Raster
resX - the x-resolution of the Raster (number of rectangles)
resY - the y-resolution of the Raster (number of rectangles)
features - the GeometryArray features
colorAlpha -
texCoordsSize -