| java.lang.Object javax.media.j3d.SceneGraphObject javax.media.j3d.Node javax.media.j3d.Leaf javax.media.j3d.Fog javax.media.j3d.ExponentialFog
ExponentialFog | public class ExponentialFog extends Fog (Code) | | The ExponentialFog leaf node extends the Fog leaf node by adding a
fog density that is used as the exponent of the fog equation. The
density is defined in the local coordinate system of the node, but
the actual fog equation will ideally take place in eye coordinates.
The fog blending factor, f, is computed as follows:
f = e-(density * z)
where
z is the distance from the viewpoint.
density is the density of the fog.
In addition to specifying the fog density, ExponentialFog lets you
specify the fog color, which is represented by R, G, and B
color values, where a color of (0,0,0) represents black.
|
Field Summary | |
final public static int | ALLOW_DENSITY_READ Specifies that this ExponentialFog node allows read access to its
density information. | final public static int | ALLOW_DENSITY_WRITE Specifies that this ExponentialFog node allows write access to its
density information. |
Constructor Summary | |
public | ExponentialFog() Constructs an ExponentialFog node with default parameters. | public | ExponentialFog(Color3f color) Constructs an ExponentialFog node with the specified fog color. | public | ExponentialFog(Color3f color, float density) Constructs an ExponentialFog node with the specified fog color
and density. | public | ExponentialFog(float r, float g, float b) Constructs an ExponentialFog node with the specified fog color. | public | ExponentialFog(float r, float g, float b, float density) Constructs an ExponentialFog node with the specified fog color
and density. |
Method Summary | |
public Node | cloneNode(boolean forceDuplicate) Used to create a new instance of the node. | void | createRetained() Creates the retained mode ExponentialFogRetained object that this
ExponentialFog node will point to. | void | duplicateAttributes(Node originalNode, boolean forceDuplicate) Copies all ExponentialFog information from
originalNode into
the current node. | public float | getDensity() Gets fog density. | public void | setDensity(float density) Sets fog density. |
ALLOW_DENSITY_READ | final public static int ALLOW_DENSITY_READ(Code) | | Specifies that this ExponentialFog node allows read access to its
density information.
|
ALLOW_DENSITY_WRITE | final public static int ALLOW_DENSITY_WRITE(Code) | | Specifies that this ExponentialFog node allows write access to its
density information.
|
ExponentialFog | public ExponentialFog()(Code) | | Constructs an ExponentialFog node with default parameters.
The default values are as follows:
|
ExponentialFog | public ExponentialFog(Color3f color)(Code) | | Constructs an ExponentialFog node with the specified fog color.
Parameters: color - the fog color |
ExponentialFog | public ExponentialFog(Color3f color, float density)(Code) | | Constructs an ExponentialFog node with the specified fog color
and density.
Parameters: color - the fog color Parameters: density - the density of the fog |
ExponentialFog | public ExponentialFog(float r, float g, float b)(Code) | | Constructs an ExponentialFog node with the specified fog color.
Parameters: r - the red component of the fog color Parameters: g - the green component of the fog color Parameters: b - the blue component of the fog color |
ExponentialFog | public ExponentialFog(float r, float g, float b, float density)(Code) | | Constructs an ExponentialFog node with the specified fog color
and density.
Parameters: r - the red component of the fog color Parameters: g - the green component of the fog color Parameters: b - the blue component of the fog color Parameters: density - the density of the fog |
cloneNode | public Node cloneNode(boolean forceDuplicate)(Code) | | Used to create a new instance of the node. This routine is called
by cloneTree to duplicate the current node.
Parameters: forceDuplicate - when set to true , causes theduplicateOnCloneTree flag to be ignored. Whenfalse , the value of each node'sduplicateOnCloneTree variable determines whetherNodeComponent data is duplicated or copied. See Also: Node.cloneTree See Also: Node.cloneNode See Also: Node.duplicateNode See Also: NodeComponent.setDuplicateOnCloneTree |
createRetained | void createRetained()(Code) | | Creates the retained mode ExponentialFogRetained object that this
ExponentialFog node will point to.
|
duplicateAttributes | void duplicateAttributes(Node originalNode, boolean forceDuplicate)(Code) | | Copies all ExponentialFog information from
originalNode into
the current node. This method is called from the
cloneNode method which is, in turn, called by the
cloneTree method.
Parameters: originalNode - the original node to duplicate. Parameters: forceDuplicate - when set to true , causes theduplicateOnCloneTree flag to be ignored. Whenfalse , the value of each node'sduplicateOnCloneTree variable determines whetherNodeComponent data is duplicated or copied. exception: RestrictedAccessException - if this object is part of a liveor compiled scenegraph. See Also: Node.duplicateNode See Also: Node.cloneTree See Also: NodeComponent.setDuplicateOnCloneTree |
getDensity | public float getDensity()(Code) | | Gets fog density.
the density of this fog exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph |
setDensity | public void setDensity(float density)(Code) | | Sets fog density.
Parameters: density - the new density of this fog exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph |
|
|