Simulates fog.
Action not implemented for this node.
More...
#include <Inventor/VRMLnodes/SoVRMLFog.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
SoVRMLFog () | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Public Attributes | |
SoSFString | fogType |
SoSFFloat | visibilityRange |
SoSFColor | color |
The SoVRMLFog node provides a way to simulate atmospheric effects.
NOTE: This class does not exist in Open Inventor 10.0 and later.This section may reference portions of the VRML97 specification that are not present in this help file. The complete VRML97 spec is available at http://www.web3d.org .
The SoVRMLFog node provides a way to simulate atmospheric effects by blending objects with the color specified by the color field based on the objects' distances from the viewer. The distances are calculated in the coordinate space of the SoVRMLFog node. The visibilityRange specifies the distance (in the SoVRMLFog node's coordinate space) at which objects are totally obscured by the fog. Objects located visibilityRange meters or more away from the viewer are drawn with a constant color of color. Objects very close to the viewer are blended very little with the fog color. A visibilityRange of 0.0 or less disables the SoVRMLFog node. Note that visibilityRange is affected by the scaling transformations of the SoVRMLFog node's parents - translations and rotations have no affect on visibilityRange.
SoVRMLFog nodes are bindable children nodes and thus there exists an SoVRMLFog stack, in which the top-most SoVRMLFog node on the stack is currently active. To push an SoVRMLFog node onto the top of the stack, a TRUE value is sent to the set_bind eventIn. Once active, the SoVRMLFog is then bound to the browser's view. A FALSE value of set_bind pops the SoVRMLFog from the stack and unbinds it from the browser viewer. See "Concepts - Bindable Children Nodes" for more details on the SoVRMLFog stack.
The fogType field controls how much of the fog color is blended with the object as a function of distance. If fogType is "LINEAR" (the default), then the amount of blending is a linear function of the distance, resulting in a depth cuing effect. If fogType is "EXPONENTIAL" then an exponential increase in blending should be used, resulting in a more natural fog appearance.
For best visual results, the SoVRMLBackground node (which is unaffected by the SoVRMLFog node) should be the same color as the fog node. The SoVRMLFog node can also be used in conjunction with the visibilityLimit field of SoVRMLNavigationInfo node to provide a smooth fade out of objects as they approach the far clipping plane.
See the section "Concepts - Lighting Model" for details on lighting calculations.
color | 1 1 1 |
fogType | "LINEAR" |
visibilityRange | 0 |
metadata | NULL |
SoSFBool | set_bind |
SoSFColor | set_color |
SoSFString | set_fogType |
SoSFFloat | set_visibilityRange |
SoSFNode | set_metadata |
SoSFBool | isBound |
SoSFBool | bindTime |
SoSFColor | color_changed |
SoSFString | fogType_changed |
SoSFFloat | visibilityRange_changed |
SoSFNode | metadata_changed |
SoVRMLFog::SoVRMLFog | ( | ) |
Constructor.
static SoType SoVRMLFog::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoVRMLNode.
virtual SoType SoVRMLFog::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoVRMLNode.