javax.media.j3d
Class ExponentialFog
java.lang.Object
|
+--javax.media.j3d.SceneGraphObject
|
+--javax.media.j3d.Node
|
+--javax.media.j3d.Leaf
|
+--javax.media.j3d.Fog
|
+--javax.media.j3d.ExponentialFog
- public class ExponentialFog
- extends Fog
The ExponentialFog leaf node defines fog density parameters for
exponential fog.
Field Summary |
static int |
ALLOW_DENSITY_READ
Specifies that this ExponentialFog node allows read access to its
density information. |
static int |
ALLOW_DENSITY_WRITE
Specifies that this ExponentialFog node allows write access to its
density information. |
Fields inherited from class javax.media.j3d.Node |
ALLOW_AUTO_COMPUTE_BOUNDS_READ,
ALLOW_AUTO_COMPUTE_BOUNDS_WRITE,
ALLOW_BOUNDS_READ,
ALLOW_BOUNDS_WRITE,
ALLOW_COLLIDABLE_READ,
ALLOW_COLLIDABLE_WRITE,
ALLOW_LOCAL_TO_VWORLD_READ,
ALLOW_PICK,
ALLOW_PICKABLE_READ,
ALLOW_PICKABLE_WRITE,
ENABLE_COLLISION_REPORTING,
ENABLE_PICK_REPORTING |
Constructor Summary |
ExponentialFog()
Constructs an ExponentialFog node with default parameters. |
ExponentialFog(Color3f color)
Constructs an ExponentialFog node with the specified fog color. |
ExponentialFog(Color3f color,
float density)
Constructs an ExponentialFog node with the specified fog color
and density. |
ExponentialFog(float r,
float g,
float b)
Constructs an ExponentialFog node with the specified fog color. |
ExponentialFog(float r,
float g,
float b,
float density)
Constructs an ExponentialFog node with the specified fog color
and density. |
Method Summary |
Node |
cloneNode(boolean forceDuplicate)
Used to create a new instance of the node. |
void |
duplicateNode(Node originalNode,
boolean forceDuplicate)
Copies all node information from originalNode into
the current node. |
float |
getDensity()
Gets fog density. |
void |
setDensity(float density)
Sets fog density. |
Methods inherited from class javax.media.j3d.Fog |
addScope,
getAllScopes,
getColor,
getInfluencingBoundingLeaf,
getInfluencingBounds,
getScope,
insertScope,
numScopes,
removeScope,
setColor,
setColor,
setInfluencingBoundingLeaf,
setInfluencingBounds,
setScope,
updateNodeReferences |
Methods inherited from class javax.media.j3d.Node |
cloneTree,
cloneTree,
cloneTree,
getBounds,
getBoundsAutoCompute,
getCollidable,
getLocalToVworld,
getLocalToVworld,
getParent,
getPickable,
setBounds,
setBoundsAutoCompute,
setCollidable,
setPickable |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ALLOW_DENSITY_READ
public static final int ALLOW_DENSITY_READ
- Specifies that this ExponentialFog node allows read access to its
density information.
ALLOW_DENSITY_WRITE
public static final int ALLOW_DENSITY_WRITE
- Specifies that this ExponentialFog node allows write access to its
density information.
ExponentialFog
public ExponentialFog()
- Constructs an ExponentialFog node with default parameters.
The default values are as follows:
ExponentialFog
public ExponentialFog(Color3f color)
- Constructs an ExponentialFog node with the specified fog color.
- Parameters:
color
- the fog color
ExponentialFog
public ExponentialFog(Color3f color,
float density)
- Constructs an ExponentialFog node with the specified fog color
and density.
- Parameters:
color
- the fog colordensity
- the density of the fog
ExponentialFog
public ExponentialFog(float r,
float g,
float b)
- Constructs an ExponentialFog node with the specified fog color.
- Parameters:
r
- the red component of the fog colorg
- the green component of the fog colorb
- the blue component of the fog color
ExponentialFog
public ExponentialFog(float r,
float g,
float b,
float density)
- Constructs an ExponentialFog node with the specified fog color
and density.
- Parameters:
r
- the red component of the fog colorg
- the green component of the fog colorb
- the blue component of the fog colordensity
- the density of the fog
setDensity
public final void setDensity(float density)
- Sets fog density.
- Parameters:
density
- the new density of this fog- Throws:
- CapabilityNotSetException - if appropriate capability is
not set and this object is part of live or compiled scene graph
getDensity
public final float getDensity()
- Gets fog density.
- Returns:
- the dentisy of this fog
- Throws:
- CapabilityNotSetException - if appropriate capability is
not set and this object is part of live or compiled scene graph
cloneNode
public Node cloneNode(boolean forceDuplicate)
- Used to create a new instance of the node. This routine is called
by
cloneTree
to duplicate the current node.
- Overrides:
- cloneNode in class Node
- Parameters:
forceDuplicate
- when set to true
, causes the
duplicateOnCloneTree
flag to be ignored. When
false
, the value of each node's
duplicateOnCloneTree
variable determines whether
NodeComponent data is duplicated or copied.- See Also:
Node.cloneTree()
,
Node.cloneNode(boolean)
,
Node.duplicateNode(javax.media.j3d.Node, boolean)
,
NodeComponent.setDuplicateOnCloneTree(boolean)
duplicateNode
public void duplicateNode(Node originalNode,
boolean forceDuplicate)
- Copies all node information from
originalNode
into
the current node. This method is called from the
cloneNode
method which is, in turn, called by the
cloneTree
method.
For any NodeComponent objects
contained by the object being duplicated, each NodeComponent
object's duplicateOnCloneTree
value is used to determine
whether the NodeComponent should be duplicated in the new node
or if just a reference to the current node should be placed in the
new node. This flag can be overridden by setting the
forceDuplicate
parameter in the cloneTree
method to true
.
- Overrides:
- duplicateNode in class Node
- Parameters:
originalNode
- the original node to duplicate.forceDuplicate
- when set to true
, causes the
duplicateOnCloneTree
flag to be ignored. When
false
, the value of each node's
duplicateOnCloneTree
variable determines whether
NodeComponent data is duplicated or copied.- See Also:
Node.cloneTree()
,
Node.cloneNode(boolean)
,
NodeComponent.setDuplicateOnCloneTree(boolean)