org.xith3d.scenegraph.primitives
Class GeoSphere

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

public class GeoSphere
extends Shape3D

A geodesic sphere based on an icosahedron.


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
GeoSphere(float radius, int N, Appearance app)
          Create a geodesic sphere based on an icosahedron.
GeoSphere(float radius, int N, boolean hemisphere, Appearance app)
          Create a geodesic sphere based on an icosahedron.
GeoSphere(float radius, int N, boolean hemisphere, org.openmali.vecmath2.Colorf color)
          Create a geodesic sphere based on an icosahedron.
GeoSphere(float radius, int N, boolean hemisphere, java.lang.String texture)
          Create a geodesic sphere based on an icosahedron.
GeoSphere(float radius, int N, boolean hemisphere, Texture texture)
          Create a geodesic sphere based on an icosahedron.
GeoSphere(float radius, int N, org.openmali.vecmath2.Colorf color)
          Create a geodesic sphere based on an icosahedron.
GeoSphere(float radius, int N, int features, boolean colorAlpha, int texCoordsSize)
          Create a geodesic sphere based on an icosahedron.
GeoSphere(float radius, int N, int features, boolean colorAlpha, int texCoordsSize, boolean hemisphere)
          Create a geodesic sphere based on an icosahedron.
GeoSphere(float radius, int N, java.lang.String texture)
          Create a geodesic sphere based on an icosahedron.
GeoSphere(float radius, int N, Texture texture)
          Create a geodesic sphere based on an icosahedron.
GeoSphere(int N, Appearance app)
          Create a geodesic sphere based on an icosahedron.
GeoSphere(int N, boolean hemisphere, Appearance app)
          Create a geodesic sphere based on an icosahedron.
GeoSphere(int N, boolean hemisphere, org.openmali.vecmath2.Colorf color)
          Create a geodesic sphere based on an icosahedron.
GeoSphere(int N, boolean hemisphere, java.lang.String texture)
          Create a geodesic sphere based on an icosahedron.
GeoSphere(int N, boolean hemisphere, Texture texture)
          Create a geodesic sphere based on an icosahedron.
GeoSphere(int N, org.openmali.vecmath2.Colorf color)
          Create a geodesic sphere based on an icosahedron.
GeoSphere(int N, int features, boolean colorAlpha, int texCoordsSize)
          Create a geodesic sphere based on an icosahedron.
GeoSphere(int N, int features, boolean colorAlpha, int texCoordsSize, boolean hemisphere)
          Create a geodesic sphere based on an icosahedron.
GeoSphere(int N, java.lang.String texture)
          Create a geodesic sphere based on an icosahedron.
GeoSphere(int N, Texture texture)
          Create a geodesic sphere based on an icosahedron.
 
Method Summary
static Geometry createGeometry(int N, int features, boolean colorAlpha, int texCoordsSize, boolean hemisphere)
          Creates the GeometryArray for a GeoSphere.
static GeometryConstruct createGeometryConstructTA(int N, int features, boolean colorAlpha, int texcoordsSize, boolean hemisphere)
           
static TriangleArray createGeometryTA(int N, int features, boolean colorAlpha, int texCoordsSize, boolean hemisphere)
           
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

GeoSphere

public GeoSphere(int N,
                 int features,
                 boolean colorAlpha,
                 int texCoordsSize,
                 boolean hemisphere)
Create a geodesic sphere based on an icosahedron. This geodesic sphere gives one of the best "roundness"/triangles ratios available; much better than a sphere generated from the slices/stacks specification. old param: addColor Set true to add color information

Parameters:
N - Split each edge of the icosahedron N times
features - Generate the data for GeometryArray.COLOR_3 | GeometryArray.NORMALS | ...
colorAlpha -
texCoordsSize -

GeoSphere

public GeoSphere(float radius,
                 int N,
                 int features,
                 boolean colorAlpha,
                 int texCoordsSize,
                 boolean hemisphere)
Create a geodesic sphere based on an icosahedron. This geodesic sphere gives one of the best "roundness"/triangles ratios available; much better than a sphere generated from the slices/stacks specification. old param: addColor Set true to add color information

Parameters:
radius - amount to enlarge the sphere by
N - Split each edge of the icosahedron N times
features - Generate the data for GeometryArray.COLOR_3 | GeometryArray.NORMALS | ...
colorAlpha -
texCoordsSize -
hemisphere -
See Also:
StaticTransform.scale(Shape3D, float)

GeoSphere

public GeoSphere(int N,
                 int features,
                 boolean colorAlpha,
                 int texCoordsSize)
Create a geodesic sphere based on an icosahedron. This geodesic sphere gives one of the best "roundness"/triangles ratios available; much better than a sphere generated from the slices/stacks specification. old param: addColor Set true to add color information

Parameters:
N - Split each edge of the icosahedron N times
features - Generate the data for GeometryArray.COLOR_3 | GeometryArray.NORMALS | ...
colorAlpha -
texCoordsSize -

GeoSphere

public GeoSphere(float radius,
                 int N,
                 int features,
                 boolean colorAlpha,
                 int texCoordsSize)
Create a geodesic sphere based on an icosahedron. This geodesic sphere gives one of the best "roundness"/triangles ratios available; much better than a sphere generated from the slices/stacks specification. old param: addColor Set true to add color information

Parameters:
radius - amount to enlarge the sphere by
N - Split each edge of the icosahedron N times
features - Generate the data for GeometryArray.COLOR_3 | GeometryArray.NORMALS | ...
colorAlpha -
texCoordsSize -
See Also:
StaticTransform.scale(Shape3D, float)

GeoSphere

public GeoSphere(int N,
                 boolean hemisphere,
                 Texture texture)
Create a geodesic sphere based on an icosahedron. This geodesic sphere gives one of the best "roundness"/triangles ratios available; much better than a sphere generated from the slices/stacks specification. old param: addColor Set true to add color information

Parameters:
N - Split each edge of the icosahedron N times
texture - the Texture to be applied to this shape's Appearance

GeoSphere

public GeoSphere(float radius,
                 int N,
                 boolean hemisphere,
                 Texture texture)
Create a geodesic sphere based on an icosahedron. This geodesic sphere gives one of the best "roundness"/triangles ratios available; much better than a sphere generated from the slices/stacks specification. old param: addColor Set true to add color information

Parameters:
radius - amount to enlarge the sphere by
N - Split each edge of the icosahedron N times
hemisphere -
texture - the Texture to be applied to this shape's Appearance
See Also:
StaticTransform.scale(Shape3D, float)

GeoSphere

public GeoSphere(int N,
                 Texture texture)
Create a geodesic sphere based on an icosahedron. This geodesic sphere gives one of the best "roundness"/triangles ratios available; much better than a sphere generated from the slices/stacks specification. old param: addColor Set true to add color information

Parameters:
N - Split each edge of the icosahedron N times
texture - the Texture to be applied to this shape's Appearance
See Also:
StaticTransform.scale(Shape3D, float)

GeoSphere

public GeoSphere(float radius,
                 int N,
                 Texture texture)
Create a geodesic sphere based on an icosahedron. This geodesic sphere gives one of the best "roundness"/triangles ratios available; much better than a sphere generated from the slices/stacks specification. old param: addColor Set true to add color information

Parameters:
radius - amount to enlarge the sphere by
N - Split each edge of the icosahedron N times
texture - the Texture to be applied to this shape's Appearance

GeoSphere

public GeoSphere(int N,
                 boolean hemisphere,
                 java.lang.String texture)
Create a geodesic sphere based on an icosahedron. This geodesic sphere gives one of the best "roundness"/triangles ratios available; much better than a sphere generated from the slices/stacks specification. old param: addColor Set true to add color information

Parameters:
N - Split each edge of the icosahedron N times
texture - the Texture to be applied to this shape's Appearance

GeoSphere

public GeoSphere(float radius,
                 int N,
                 boolean hemisphere,
                 java.lang.String texture)
Create a geodesic sphere based on an icosahedron. This geodesic sphere gives one of the best "roundness"/triangles ratios available; much better than a sphere generated from the slices/stacks specification. old param: addColor Set true to add color information

Parameters:
radius - amount to enlarge the sphere by
N - Split each edge of the icosahedron N times
hemisphere -
texture - the Texture to be applied to this shape's Appearance
See Also:
StaticTransform.scale(Shape3D, float)

GeoSphere

public GeoSphere(int N,
                 java.lang.String texture)
Create a geodesic sphere based on an icosahedron. This geodesic sphere gives one of the best "roundness"/triangles ratios available; much better than a sphere generated from the slices/stacks specification. old param: addColor Set true to add color information

Parameters:
N - Split each edge of the icosahedron N times
texture - the Texture to be applied to this shape's Appearance
See Also:
StaticTransform.scale(Shape3D, float)

GeoSphere

public GeoSphere(float radius,
                 int N,
                 java.lang.String texture)
Create a geodesic sphere based on an icosahedron. This geodesic sphere gives one of the best "roundness"/triangles ratios available; much better than a sphere generated from the slices/stacks specification. old param: addColor Set true to add color information

Parameters:
radius - amount to enlarge the sphere by
N - Split each edge of the icosahedron N times
texture - the Texture to be applied to this shape's Appearance

GeoSphere

public GeoSphere(int N,
                 boolean hemisphere,
                 org.openmali.vecmath2.Colorf color)
Create a geodesic sphere based on an icosahedron. This geodesic sphere gives one of the best "roundness"/triangles ratios available; much better than a sphere generated from the slices/stacks specification. old param: addColor Set true to add color information

Parameters:
N - Split each edge of the icosahedron N times
color - the color to be applied to this shape's Appearance's ColoringAttributes

GeoSphere

public GeoSphere(float radius,
                 int N,
                 boolean hemisphere,
                 org.openmali.vecmath2.Colorf color)
Create a geodesic sphere based on an icosahedron. This geodesic sphere gives one of the best "roundness"/triangles ratios available; much better than a sphere generated from the slices/stacks specification. old param: addColor Set true to add color information

Parameters:
radius - amount to enlarge the sphere by
N - Split each edge of the icosahedron N times
hemisphere -
color - the color to be applied to this shape's Appearance's ColoringAttributes
See Also:
StaticTransform.scale(Shape3D, float)

GeoSphere

public GeoSphere(int N,
                 org.openmali.vecmath2.Colorf color)
Create a geodesic sphere based on an icosahedron. This geodesic sphere gives one of the best "roundness"/triangles ratios available; much better than a sphere generated from the slices/stacks specification. old param: addColor Set true to add color information

Parameters:
N - Split each edge of the icosahedron N times
color - the color to be applied to this shape's Appearance's ColoringAttributes

GeoSphere

public GeoSphere(float radius,
                 int N,
                 org.openmali.vecmath2.Colorf color)
Create a geodesic sphere based on an icosahedron. This geodesic sphere gives one of the best "roundness"/triangles ratios available; much better than a sphere generated from the slices/stacks specification. old param: addColor Set true to add color information

Parameters:
radius - amount to enlarge the sphere by
N - Split each edge of the icosahedron N times
color - the color to be applied to this shape's Appearance's ColoringAttributes

GeoSphere

public GeoSphere(int N,
                 boolean hemisphere,
                 Appearance app)
Create a geodesic sphere based on an icosahedron. This geodesic sphere gives one of the best "roundness"/triangles ratios available; much better than a sphere generated from the slices/stacks specification. old param: addColor Set true to add color information

Parameters:
N - Split each edge of the icosahedron N times
app - the Appearance to be applied to this shape

GeoSphere

public GeoSphere(float radius,
                 int N,
                 boolean hemisphere,
                 Appearance app)
Create a geodesic sphere based on an icosahedron. This geodesic sphere gives one of the best "roundness"/triangles ratios available; much better than a sphere generated from the slices/stacks specification. old param: addColor Set true to add color information

Parameters:
radius - amount to enlarge the sphere by
N - Split each edge of the icosahedron N times
hemisphere -
app - the Appearance to be applied to this shape
See Also:
StaticTransform.scale(Shape3D, float)

GeoSphere

public GeoSphere(int N,
                 Appearance app)
Create a geodesic sphere based on an icosahedron. This geodesic sphere gives one of the best "roundness"/triangles ratios available; much better than a sphere generated from the slices/stacks specification. old param: addColor Set true to add color information

Parameters:
N - Split each edge of the icosahedron N times
app - the Appearance to be applied to this shape

GeoSphere

public GeoSphere(float radius,
                 int N,
                 Appearance app)
Create a geodesic sphere based on an icosahedron. This geodesic sphere gives one of the best "roundness"/triangles ratios available; much better than a sphere generated from the slices/stacks specification. old param: addColor Set true to add color information

Parameters:
radius - amount to enlarge the sphere by
N - Split each edge of the icosahedron N times
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.

createGeometryConstructTA

public static GeometryConstruct createGeometryConstructTA(int N,
                                                          int features,
                                                          boolean colorAlpha,
                                                          int texcoordsSize,
                                                          boolean hemisphere)

createGeometryTA

public static TriangleArray createGeometryTA(int N,
                                             int features,
                                             boolean colorAlpha,
                                             int texCoordsSize,
                                             boolean hemisphere)

createGeometry

public static Geometry createGeometry(int N,
                                      int features,
                                      boolean colorAlpha,
                                      int texCoordsSize,
                                      boolean hemisphere)
Creates the GeometryArray for a GeoSphere.

Parameters:
N - Split each edge of the icosahedron N times
features - Generate the data for GeometryArray.COLOR_3 | GeometryArray.NORMALS | ...
colorAlpha -
texCoordsSize -