org.xith3d.scenegraph.primitives
Class GeoEllipsoid

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

public class GeoEllipsoid
extends Shape3D

Geodesic sphere, warped into an ellipsoid.


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
GeoEllipsoid(float rx, float ry, float rz, int N, Appearance app)
          Geodesic sphere, warped into an ellipsoid.
GeoEllipsoid(float rx, float ry, float rz, int N, org.openmali.vecmath2.Colorf color)
          Geodesic sphere, warped into an ellipsoid.
GeoEllipsoid(float rx, float ry, float rz, int N, int features, boolean colorAlpha, int texCoordsSize)
          Geodesic sphere, warped into an ellipsoid.
GeoEllipsoid(float rx, float ry, float rz, int N, java.lang.String texture)
          Geodesic sphere, warped into an ellipsoid.
GeoEllipsoid(float rx, float ry, float rz, int N, Texture texture)
          Geodesic sphere, warped into an ellipsoid.
 
Method Summary
static void geodesate(org.openmali.vecmath2.Vector3f a, org.openmali.vecmath2.Vector3f b, org.openmali.vecmath2.Vector3f c, int N, int offset, org.openmali.vecmath2.Vector3f[] vertices)
          This method can be used to geodesate a triangle.
 
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

GeoEllipsoid

public GeoEllipsoid(float rx,
                    float ry,
                    float rz,
                    int N,
                    int features,
                    boolean colorAlpha,
                    int texCoordsSize)
Geodesic sphere, warped into an ellipsoid. Creates 20*N^2 triangles

Parameters:
rx - Radius along x axis
ry - Radius along y axis
rz - Radius along z axis
N - Split each edge of the icosahedron N times
features - the GeometryArray features
colorAlpha -
texCoordsSize -

GeoEllipsoid

public GeoEllipsoid(float rx,
                    float ry,
                    float rz,
                    int N,
                    Texture texture)
Geodesic sphere, warped into an ellipsoid. Creates 20*N^2 triangles

Parameters:
rx - Radius along x axis
ry - Radius along y axis
rz - Radius along z axis
N - Split each edge of the icosahedron N times
texture - the Texture to be applied to the shape's Appearance

GeoEllipsoid

public GeoEllipsoid(float rx,
                    float ry,
                    float rz,
                    int N,
                    java.lang.String texture)
Geodesic sphere, warped into an ellipsoid. Creates 20*N^2 triangles

Parameters:
rx - Radius along x axis
ry - Radius along y axis
rz - Radius along z axis
N - Split each edge of the icosahedron N times
texture - the Texture to be applied to the shape's Appearance

GeoEllipsoid

public GeoEllipsoid(float rx,
                    float ry,
                    float rz,
                    int N,
                    org.openmali.vecmath2.Colorf color)
Geodesic sphere, warped into an ellipsoid. Creates 20*N^2 triangles

Parameters:
rx - Radius along x axis
ry - Radius along y axis
rz - Radius along z axis
N - Split each edge of the icosahedron N times
color - color to be applied to this shape's ColoringAttributes

GeoEllipsoid

public GeoEllipsoid(float rx,
                    float ry,
                    float rz,
                    int N,
                    Appearance app)
Geodesic sphere, warped into an ellipsoid. Creates 20*N^2 triangles

Parameters:
rx - Radius along x axis
ry - Radius along y axis
rz - Radius along z axis
N - Split each edge of the icosahedron N times
app - the Appearance to be applied to this shape
Method Detail

geodesate

public static void geodesate(org.openmali.vecmath2.Vector3f a,
                             org.openmali.vecmath2.Vector3f b,
                             org.openmali.vecmath2.Vector3f c,
                             int N,
                             int offset,
                             org.openmali.vecmath2.Vector3f[] vertices)
This method can be used to geodesate a triangle. In mathspeak, project the nth-order tessellation onto the unit circle. In English, subdivide the triangle into N^2 smaller triangles of the same proportions, and then map all the new vertices to the unit circle. (This routine assumes a, b, and c are already unit vectors.)

Parameters:
a - First corner (should be a unit vector)
b - Second corner (should be a unit vector)
c - Third corner (should be a unit vector)
N - Number of splits in each edge
offset - Offset to base vertex index
vertices - Target vertex array