org.xith3d.scenegraph.primitives
Class Cone

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

public class Cone
extends Shape3D

An open cone pointing in the +z direction. Has unit height and radius.

See Also:
Original Announcement

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
Cone(float radius, float height, int slices, Appearance app)
          Generate an open cone pointing in the +z direction.
Cone(float radius, float height, int slices, org.openmali.vecmath2.Colorf color)
          Generate an open cone pointing in the +z direction.
Cone(float radius, float height, int slices, int features, boolean colorAlpha, int texCoordsSize)
          Generate an open cone pointing in the +z direction.
Cone(float radius, float height, int slices, java.lang.String texture)
          Generate an open cone pointing in the +z direction.
Cone(float radius, float height, int slices, Texture texture)
          Generate an open cone pointing in the +z direction.
Cone(int slices, Appearance app)
          Generate an open cone pointing in the +z direction.
Cone(int slices, org.openmali.vecmath2.Colorf color)
          Generate an open cone pointing in the +z direction.
Cone(int slices, int features, boolean colorAlpha, int texCoordsSize)
          Generate an open cone pointing in the +z direction.
Cone(int slices, java.lang.String texture)
          Generate an open cone pointing in the +z direction.
Cone(int slices, Texture texture)
          Generate an open cone pointing in the +z direction.
 
Method Summary
static Geometry createGeometry(float radius, float height, int slices, int features, boolean colorAlpha, int texCoordsSize)
          Creates the GeometryArray for a Sphere.
static GeometryConstruct createGeometryConstructTA(float radius, float height, int slices, int features, boolean colorAlpha, int texCoordsSize)
          Generate the GeometryConstruct for a TriangleArray to build a Cone pointing in the +y direction (with unit radius and length).
static TriangleArray createGeometryTA(float radius, float height, int slices, int features, boolean colorAlpha, int texCoordsSize)
          Generate a TriangleArray to build a Cone pointing in the +y direction (with unit radius and length).
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

Cone

public Cone(float radius,
            float height,
            int slices,
            int features,
            boolean colorAlpha,
            int texCoordsSize)
Generate an open cone pointing in the +z direction. Has unit height and radius.

Parameters:
radius - the cone's base-radius
height - the cone's height
slices - Number of vertical stripes down the cone
features - Generate the data for GeometryArray.COLOR_3 | GeometryArray.NORMALS | ...
colorAlpha -
texCoordsSize -

Cone

public Cone(int slices,
            int features,
            boolean colorAlpha,
            int texCoordsSize)
Generate an open cone pointing in the +z direction. Has unit height and radius.

Parameters:
slices - Number of vertical stripes down the cone
features - Generate the data for GeometryArray.COLOR_3 | GeometryArray.NORMALS | ...
colorAlpha -
texCoordsSize -

Cone

public Cone(float radius,
            float height,
            int slices,
            Texture texture)
Generate an open cone pointing in the +z direction. Has unit height and radius.

Parameters:
radius - the cone's base-radius
height - the cone's height
slices - Number of vertical stripes down the cone
texture - the Texture to apply to this Shape's Appearance

Cone

public Cone(int slices,
            Texture texture)
Generate an open cone pointing in the +z direction. Has unit height and radius.

Parameters:
slices - Number of vertical stripes down the cone
texture - the Texture to apply to this Shape's Appearance

Cone

public Cone(float radius,
            float height,
            int slices,
            java.lang.String texture)
Generate an open cone pointing in the +z direction. Has unit height and radius.

Parameters:
radius - the cone's base-radius
height - the cone's height
slices - Number of vertical stripes down the cone
texture - the Texture to apply to this Shape's Appearance

Cone

public Cone(int slices,
            java.lang.String texture)
Generate an open cone pointing in the +z direction. Has unit height and radius.

Parameters:
slices - Number of vertical stripes down the cone
texture - the Texture to apply to this Shape's Appearance

Cone

public Cone(float radius,
            float height,
            int slices,
            org.openmali.vecmath2.Colorf color)
Generate an open cone pointing in the +z direction. Has unit height and radius.

Parameters:
radius - the cone's base-radius
height - the cone's height
slices - Number of vertical stripes down the cone
color - the color to apply to this Shape's Appearance

Cone

public Cone(int slices,
            org.openmali.vecmath2.Colorf color)
Generate an open cone pointing in the +z direction. Has unit height and radius.

Parameters:
slices - Number of vertical stripes down the cone
color - the color to apply to this Shape's Appearance

Cone

public Cone(float radius,
            float height,
            int slices,
            Appearance app)
Generate an open cone pointing in the +z direction. Has unit height and radius.

Parameters:
radius - the cone's base-radius
height - the cone's height
slices - Number of vertical stripes down the cone
app - the Appearance to be applied to this Shape

Cone

public Cone(int slices,
            Appearance app)
Generate an open cone pointing in the +z direction. Has unit height and radius.

Parameters:
slices - Number of vertical stripes down the cone
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(float radius,
                                                          float height,
                                                          int slices,
                                                          int features,
                                                          boolean colorAlpha,
                                                          int texCoordsSize)
Generate the GeometryConstruct for a TriangleArray to build a Cone pointing in the +y direction (with unit radius and length).

Parameters:
radius - the cone's base-radius
height - the cone's height
slices - Number of vertical stripes down the cone
features - Generate the data for GeometryArray.NORMALS | GeometryArray.TEXTURE_COORDINATES_2 ...
colorAlpha -
texCoordsSize -

createGeometryTA

public static TriangleArray createGeometryTA(float radius,
                                             float height,
                                             int slices,
                                             int features,
                                             boolean colorAlpha,
                                             int texCoordsSize)
Generate a TriangleArray to build a Cone pointing in the +y direction (with unit radius and length).

Parameters:
radius - the cone's base-radius
height - the cone's height
slices - Number of vertical stripes down the cone
features - Generate the data for GeometryArray.NORMALS | GeometryArray.TEXTURE_COORDINATES_2 ...
colorAlpha -
texCoordsSize -

createGeometry

public static Geometry createGeometry(float radius,
                                      float height,
                                      int slices,
                                      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:
radius - the cone's base-radius
height - the cone's height
slices - Number of vertical stripes down the sphere
features - Generate the data for GeometryArray.COLOR_3 | GeometryArray.NORMALS | ...
colorAlpha -
texCoordsSize -