org.xith3d.scenegraph.primitives
Class Hemisphere

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

public class Hemisphere
extends Shape3D

A sphere using standard specifications.


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
Hemisphere(float radius, int slices, int stacks, Appearance app)
          Creates a hemisphere using standard specifications.
Hemisphere(float radius, int slices, int stacks, org.openmali.vecmath2.Colorf color)
          Creates a hemisphere using standard specifications.
Hemisphere(float radius, int slices, int stacks, int features, boolean colorAlpha, int texCoordsSize)
          Creates a hemisphere using standard specifications.
Hemisphere(float radius, int slices, int stacks, java.lang.String texture)
          Creates a hemisphere using standard specifications.
Hemisphere(float radius, int slices, int stacks, Texture texture)
          Creates a hemisphere using standard specifications.
Hemisphere(int slices, int stacks, Appearance app)
          Creates a hemisphere using standard specifications.
Hemisphere(int slices, int stacks, org.openmali.vecmath2.Colorf color)
          Creates a hemisphere using standard specifications.
Hemisphere(int slices, int stacks, int features, boolean colorAlpha, int texCoordsSize)
          Creates a hemisphere using standard specifications.
Hemisphere(int slices, int stacks, java.lang.String texture)
          Creates a hemisphere using standard specifications.
Hemisphere(int slices, int stacks, Texture texture)
          Creates a hemisphere using standard specifications.
 
Method Summary
static Geometry createGeometry(int slices, int stacks, int features, boolean colorAlpha, int texCoordsSize)
          Creates the GeometryArray for a Sphere.
static GeometryConstruct createGeometryConstructITA(int slices, int stacks, int features, boolean colorAlpha, int texCoordsSize)
          Creates a GeometryConstruct for an IndexedTriangleArray for a Raster Shape3D.
static GeometryConstruct createGeometryConstructITSA(int slices, int stacks, int features, boolean colorAlpha, int texCoordsSize)
          Creates the GemetryConstruct for a Hemisphere.
static GeometryConstruct createGeometryConstructTA(int slices, int stacks, int features, boolean colorAlpha, int texCoordsSize)
          Creates a GeometryConstruct for a TriangleArray for a Raster Shape3D.
static GeometryConstruct createGeometryConstructTSA(int slices, int stacks, int features, boolean colorAlpha, int texCoordsSize)
          Creates a GeometryConstruct for a TriangleStripArray for a Raster Shape3D.
static IndexedTriangleArray createGeometryITA(int slices, int stacks, int features, boolean colorAlpha, int texCoordsSize)
          Creates an IndexedTriangleArray for a Hemisphere Shape3D.
static IndexedTriangleStripArray createGeometryITSA(int slices, int stacks, int features, boolean colorAlpha, int texCoordsSize)
           
static TriangleArray createGeometryTA(int slices, int stacks, int features, boolean colorAlpha, int texCoordsSize)
          Creates a TriangleArray for a Hemisphere Shape3D.
static TriangleStripArray createGeometryTSA(int slices, int stacks, int features, boolean colorAlpha, int texCoordsSize)
          Creates a TriangleStripArray for a Hemisphere 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

Hemisphere

public Hemisphere(int slices,
                  int stacks,
                  int features,
                  boolean colorAlpha,
                  int texCoordsSize)
Creates a hemisphere using standard specifications.
 Parametric equations:
 x=r*cos(theta)*sin(phi)
 y=r*sin(theta)*sin(phi)
 z=r*cos(phi)
 over theta in [0,2*PI] and phi in [0,PI]
 

Parameters:
slices - Number of vertical stripes down the sphere
stacks - Number of stacked rings around the sphere
features - Generate the data for GeometryArray.COLOR_3 | GeometryArray.NORMALS | ...
colorAlpha -
texCoordsSize -

Hemisphere

public Hemisphere(float radius,
                  int slices,
                  int stacks,
                  int features,
                  boolean colorAlpha,
                  int texCoordsSize)
Creates a hemisphere using standard specifications.

Parameters:
radius - amount to enlarge the sphere by
slices - Number of vertical stripes down the sphere
stacks - Number of stacked rings around the sphere
features - Generate the data for GeometryArray.COLOR_3 | GeometryArray.NORMALS | ...
colorAlpha -
texCoordsSize -
See Also:
StaticTransform.scale(Shape3D, float)

Hemisphere

public Hemisphere(float radius,
                  int slices,
                  int stacks,
                  Texture texture)
Creates a hemisphere using standard specifications.

Parameters:
radius - amount to enlarge the sphere by
slices - Number of vertical stripes down the sphere
stacks - Number of stacked rings around the sphere
texture - the texture to apply to the Sphere's Appearance

Hemisphere

public Hemisphere(float radius,
                  int slices,
                  int stacks,
                  java.lang.String texture)
Creates a hemisphere using standard specifications.

Parameters:
radius - amount to enlarge the sphere by
slices - Number of vertical stripes down the sphere
stacks - Number of stacked rings around the sphere
texture - the texture to apply to the Sphere's Appearance

Hemisphere

public Hemisphere(int slices,
                  int stacks,
                  Texture texture)
Creates a hemisphere using standard specifications.

Parameters:
slices - Number of vertical stripes down the sphere
stacks - Number of stacked rings around the sphere
texture - the texture to apply to the Sphere's Appearance

Hemisphere

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

Parameters:
slices - Number of vertical stripes down the sphere
stacks - Number of stacked rings around the sphere
texture - the texture to apply to the Sphere's Appearance

Hemisphere

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

Parameters:
slices - Number of vertical stripes down the sphere
stacks - Number of stacked rings around the sphere
color - the color to apply to the Sphere's Appearance

Hemisphere

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

Parameters:
radius - amount to enlarge the sphere by
slices - Number of vertical stripes down the sphere
stacks - Number of stacked rings around the sphere
color - the color to apply to the Sphere's Appearance

Hemisphere

public Hemisphere(int slices,
                  int stacks,
                  Appearance app)
Creates a hemisphere using standard specifications.

Parameters:
slices - Number of vertical stripes down the sphere
stacks - Number of stacked rings around the sphere
app - the Appearance to be applied to this Shape

Hemisphere

public Hemisphere(float radius,
                  int slices,
                  int stacks,
                  Appearance app)
Creates a hemisphere using standard specifications.

Parameters:
radius - amount to enlarge the sphere by
slices - Number of vertical stripes down the sphere
stacks - Number of stacked rings around the sphere
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.

createGeometryConstructITSA

public static GeometryConstruct createGeometryConstructITSA(int slices,
                                                            int stacks,
                                                            int features,
                                                            boolean colorAlpha,
                                                            int texCoordsSize)
Creates the GemetryConstruct for a Hemisphere.
 Parametric equations:
 x = r * cos( theta ) * sin( phi )
 y = r * sin( theta ) * sin( phi )
 z = r * cos( phi )
 over theta in [ 0, 2 * PI ] and phi in [ 0, PI ]
 

Parameters:
slices - Number of vertical stripes down the sphere
stacks - Number of stacked rings around the sphere
features - Generate the data for GeometryArray.COLOR_3 | GeometryArray.NORMALS | ...
colorAlpha -
texCoordsSize -

createGeometryITSA

public static IndexedTriangleStripArray createGeometryITSA(int slices,
                                                           int stacks,
                                                           int features,
                                                           boolean colorAlpha,
                                                           int texCoordsSize)

createGeometryConstructITA

public static GeometryConstruct createGeometryConstructITA(int slices,
                                                           int stacks,
                                                           int features,
                                                           boolean colorAlpha,
                                                           int texCoordsSize)
Creates a GeometryConstruct for an IndexedTriangleArray for a Raster Shape3D.

Parameters:
slices - Number of vertical stripes down the sphere
stacks - Number of stacked rings around the sphere
features - Generate the data for GeometryArray.COLOR_3 | GeometryArray.NORMALS | ...
colorAlpha -
texCoordsSize -

createGeometryITA

public static IndexedTriangleArray createGeometryITA(int slices,
                                                     int stacks,
                                                     int features,
                                                     boolean colorAlpha,
                                                     int texCoordsSize)
Creates an IndexedTriangleArray for a Hemisphere Shape3D.

Parameters:
slices - Number of vertical stripes down the sphere
stacks - Number of stacked rings around the sphere
features - Generate the data for GeometryArray.COLOR_3 | GeometryArray.NORMALS | ...
colorAlpha -
texCoordsSize -

createGeometryConstructTSA

public static GeometryConstruct createGeometryConstructTSA(int slices,
                                                           int stacks,
                                                           int features,
                                                           boolean colorAlpha,
                                                           int texCoordsSize)
Creates a GeometryConstruct for a TriangleStripArray for a Raster Shape3D.

Parameters:
slices - Number of vertical stripes down the sphere
stacks - Number of stacked rings around the sphere
features - Generate the data for GeometryArray.COLOR_3 | GeometryArray.NORMALS | ...
colorAlpha -
texCoordsSize -

createGeometryTSA

public static TriangleStripArray createGeometryTSA(int slices,
                                                   int stacks,
                                                   int features,
                                                   boolean colorAlpha,
                                                   int texCoordsSize)
Creates a TriangleStripArray for a Hemisphere Shape3D.

Parameters:
slices - Number of vertical stripes down the sphere
stacks - Number of stacked rings around the sphere
features - Generate the data for GeometryArray.COLOR_3 | GeometryArray.NORMALS | ...
colorAlpha -
texCoordsSize -

createGeometryConstructTA

public static GeometryConstruct createGeometryConstructTA(int slices,
                                                          int stacks,
                                                          int features,
                                                          boolean colorAlpha,
                                                          int texCoordsSize)
Creates a GeometryConstruct for a TriangleArray for a Raster Shape3D.

Parameters:
slices - Number of vertical stripes down the sphere
stacks - Number of stacked rings around the sphere
features - Generate the data for GeometryArray.COLOR_3 | GeometryArray.NORMALS | ...
colorAlpha -
texCoordsSize -

createGeometryTA

public static TriangleArray createGeometryTA(int slices,
                                             int stacks,
                                             int features,
                                             boolean colorAlpha,
                                             int texCoordsSize)
Creates a TriangleArray for a Hemisphere Shape3D.

Parameters:
slices - Number of vertical stripes down the sphere
stacks - Number of stacked rings around the sphere
features - Generate the data for GeometryArray.COLOR_3 | GeometryArray.NORMALS | ...
colorAlpha -
texCoordsSize -

createGeometry

public static Geometry createGeometry(int slices,
                                      int stacks,
                                      int features,
                                      boolean colorAlpha,
                                      int texCoordsSize)
Creates the GeometryArray for a Sphere.
 Parametric equations:
 x = r * cos( theta ) * sin( phi )
 y = r * sin( theta ) * sin( phi )
 z = r * cos( phi )
 over theta in [ 0, 2 * PI ] and phi in [ 0, PI ]
 

Parameters:
slices - Number of vertical stripes down the sphere
stacks - Number of stacked rings around the sphere
features - Generate the data for GeometryArray.COLOR_3 | GeometryArray.NORMALS | ...
colorAlpha -
texCoordsSize -