Home | Hierarchy | Members | Alphabetical | Related Pages |
#include <fog.h>
Inherits Node.
Inheritance diagram for Fog:
Public Member Functions | |
Fog (const char *name="") | |
virtual | ~Fog () |
virtual unsigned int | nbFields () const |
virtual FieldHandle | field (const std::string &n) |
virtual FieldHandle | field (const unsigned int i) |
virtual bool | isSetToDefaultValue (const unsigned int i) const |
virtual unsigned int | nbEventsIn () const |
virtual EventInHandle | eventIn (const std::string &n) |
virtual EventInHandle | eventIn (const unsigned int i) |
virtual unsigned int | nbEventsOut () const |
virtual EventOutHandle | eventOut (const std::string &n) |
virtual EventOutHandle | eventOut (const unsigned int i) |
const char * | typeName () const |
virtual Node * | duplicate () const |
virtual Node * | duplicate (std::map< const Node *, Node * > &) const |
Public Attributes | |
Exposed Fields | |
A field that is capable of receiving events via an eventIn to change its value(s), and generating events via an eventOut when its value(s) change. | |
SFColor | color |
SFString | fogType |
SFFloat | visibilityRange |
Events In | |
EventIn< SFBool > | set_bind |
EventIn< SFColor > | set_color |
EventIn< SFString > | set_fogType |
EventIn< SFFloat > | set_visibilityRange |
Events Out | |
EventOut< SFBool > | isBound |
EventOut< SFColor > | color_changed |
EventOut< SFString > | fogType_changed |
EventOut< SFFloat > | visibilityRange_changed |
The Fog node provides a way to simulate atmospheric effects by blending
objects with the colour specified by the color field based on the
distances of the various objects from the viewer. The distances are calculated
in the coordinate space of the Fog node. The visibilityRange specifies
the distance in metres (in the local coordinate system) at which objects
are totally obscured by the fog. Objects located outside the visibilityRange
from the viewer are drawn with a constant colour of color. Objects
very close to the viewer are blended very little with the fog color.
A visibilityRange of 0.0 disables the Fog node. The visibilityRange
is affected by the scaling transformations of the Fog node's parents; translations
and rotations have no affect on visibilityRange. Values of the visibilityRange
field shall be in the range [0, ).
Since Fog nodes are bindable children nodes (see 4.6.10, Bindable children nodes), a Fog node stack exists, in which the top-most Fog node on the stack is currently active. To push a Fog node onto the top of the stack, a TRUE value is sent to the set_bind eventIn. Once active, the Fog node is bound to the browser view. A FALSE value sent to set_bind, pops the Fog node from the stack and unbinds it from the browser viewer. More details on the Fog node stack can be found in 4.6.10, Bindable children nodes.
The fogType field controls how much of the fog colour is blended with the object as a function of distance. If fogType is "LINEAR", the amount of blending is a linear function of the distance, resulting in a depth cueing effect. If fogType is "EXPONENTIAL," an exponential increase in blending is used, resulting in a more natural fog appearance.
The effect of fog on lighting calculations is described in 4.14, Lighting model.
|
Construct a node with all its fields set to default value, which is equivalent to the code below: color.setRGB(1,1,1); fogType = string("LINEAR"); visibilityRange = 0; |
|
Virtual destructor, does nothing |
|
Implements Node. |
|
Returns a deep copy of this node, that is a fully independant node with all children (if any) also copied. This is mainly useful for instanciating protos. Implements Node. |
|
Return a handle on the
This function is useful, with nbEventsIn() if you want to traverse all events in of a Node. Implements Node. |
|
Return a handle on the event in named
Implements Node. |
|
Return a handle on the
Implements Node. |
|
Return a handle on the event out named
Implements Node. |
|
Return a handle on the
Implements Node. |
|
Return a handle on the field named
Implements Node. |
|
Implements Node. |
|
Returns the number of events in for this node type. Implements Node. |
|
Returns the number of events out for this node type. Implements Node. |
|
Returns the number of fields (exposed or not) for this node type. Implements Node. |
|
Returns Implements Node. |
|
See Detailed Description for meaning of this field. Default value is set to color.setRGB(1,1,1); |
|
Changed event associated to exposedField color |
|
See Detailed Description for meaning of this field. Default value is set to fogType = string("LINEAR"); |
|
Changed event associated to exposedField fogType |
|
See Detailed Description for meaning of this event. |
|
See Detailed Description for meaning of this event. |
|
Set event associated to exposedField color |
|
Set event associated to exposedField fogType |
|
Set event associated to exposedField visibilityRange |
|
See Detailed Description for meaning of this field. Default value is set to visibilityRange = 0; |
|
Changed event associated to exposedField visibilityRange |
Generated on 24 Feb 2005 with
![]() |
|