org.xith3d.scenegraph
Class Fog

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.Fog
All Implemented Interfaces:
org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.openmali.spatial.SpatialNode
Direct Known Subclasses:
ExponentialFog, LinearFog

public abstract class Fog
extends Leaf

Fog defines a common set of attributes that contorl fog, or depth cueing, in the scene.


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
Fog()
          Constructs a new Fog object with a default color of black.
Fog(org.openmali.vecmath2.Colorf color)
          Constructs a new Fog object with the specified color.
 
Method Summary
 void freeOpenGLResources(CanvasPeer canvasPeer)
          This method frees OpenGL resources (names) for all Nodes in the traversal of this Node(-Group).
 org.openmali.vecmath2.Colorf getColor()
          Gets the color for this object.
 org.openmali.vecmath2.Colorf getColor(org.openmali.vecmath2.Colorf color)
          Sets the color for this object.
 int getFogID()
           
 BoundingLeaf getInfluencingBoundingLeaf()
          Sets the influence bounding leaf for this object.
 org.openmali.spatial.bounds.Bounds getInfluencingBounds()
          Gets the influence bounding region for this object.
 void setColor(org.openmali.vecmath2.Colorf color)
          Sets the color for this object.
 void setInfluencingBoundingLeaf(BoundingLeaf boundingLeaf)
          Sets the influence bounding leaf for this object.
 void setInfluencingBounds(org.openmali.spatial.bounds.Bounds region)
          Sets the influence bounding region for this object.
 boolean traverse(DetailedTraversalCallback callback)
          Traverses the scenegraph from this node on.
 
Methods inherited from class org.xith3d.scenegraph.Leaf
dump, getPickHost, setPickHost
 
Methods inherited from class org.xith3d.scenegraph.Node
absorbDetails, 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, setBounds, setBoundsAutoCompute, setBoundsDirty, setBoundsDirtyUpward, setBoundsTypeHint, setDefaultPickable, setGlobalIgnoreBounds, setIgnoreBounds, setIsOccluder, setModListener, setOrderedChild, setParent, setPickable, setPickableRecursive, setPickableRecursive, setRenderable, setShadowAttachment, setShowBounds, setTransformGroup, setTreeCell, sharedCopy, sharedCopy, traverse, unmergeInheritedFog, unmergeInheritedLight, unmergeInheritedNodes, updateBounds, updateBoundsCheap, updateOrderedChild, updateTransformGroup, updateWorldTransform
 
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

Fog

public Fog()
Constructs a new Fog object with a default color of black.


Fog

public Fog(org.openmali.vecmath2.Colorf color)
Constructs a new Fog object with the specified color.

Method Detail

getFogID

public final int getFogID()

setColor

public final void setColor(org.openmali.vecmath2.Colorf color)
Sets the color for this object.


getColor

public final org.openmali.vecmath2.Colorf getColor(org.openmali.vecmath2.Colorf color)
Sets the color for this object.


getColor

public final org.openmali.vecmath2.Colorf getColor()
Gets the color for this object.


setInfluencingBounds

public final void setInfluencingBounds(org.openmali.spatial.bounds.Bounds region)
Sets the influence bounding region for this object.


getInfluencingBounds

public final org.openmali.spatial.bounds.Bounds getInfluencingBounds()
Gets the influence bounding region for this object.


setInfluencingBoundingLeaf

public final void setInfluencingBoundingLeaf(BoundingLeaf boundingLeaf)
Sets the influence bounding leaf for this object.


getInfluencingBoundingLeaf

public final BoundingLeaf getInfluencingBoundingLeaf()
Sets the influence bounding leaf for this object.


freeOpenGLResources

public void freeOpenGLResources(CanvasPeer canvasPeer)
This method frees OpenGL resources (names) for all Nodes in the traversal of this Node(-Group).

Specified by:
freeOpenGLResources in class Node

traverse

public boolean traverse(DetailedTraversalCallback callback)
Traverses the scenegraph from this node on. If this Node is a Group it will recusively run through each child.

Overrides:
traverse in class Leaf
Parameters:
callback - the listener is notified of any traversed Node on the way
Returns:
if false, the whole traversal will stop