1SoEnvironment(3IV)()                                      SoEnvironment(3IV)()
2
3
4

NAME

6       SoEnvironment — global environment node
7

INHERITS FROM

9       SoBase > SoFieldContainer > SoNode > SoEnvironment
10

SYNOPSIS

12       #include <Inventor/nodes/SoEnvironment.h>
13
14     enum FogType {
15          SoEnvironment::NONE   No fog
16          SoEnvironment::HAZE   Linear increase in opacity with distance
17          SoEnvironment::FOG    Exponential increase in opacity
18          SoEnvironment::SMOKE  Exponential squared increase in opacity
19     }
20
21          Fields from class SoEnvironment:
22
23     SoSFFloat           ambientIntensity
24     SoSFColor           ambientColor
25     SoSFVec3f           attenuation
26     SoSFEnum            fogType
27     SoSFColor           fogColor
28     SoSFFloat           fogVisibility
29
30          Methods from class SoEnvironment:
31
32                         SoEnvironment()
33     static SoType       getClassTypeId()
34
35          Methods from class SoNode:
36
37     void                setOverride(SbBool state)
38     SbBool              isOverride() const
39     SoNode *            copy(SbBool copyConnections = FALSE) const
40     virtual SbBool      affectsState() const
41     static SoNode *     getByName(const SbName &name)
42     static int          getByName(const SbName &name, SoNodeList &list)
43
44          Methods from class SoFieldContainer:
45
46     void                setToDefaults()
47     SbBool              hasDefaultValues() const
48     SbBool              fieldsAreEqual(const SoFieldContainer *fc) const
49     void                copyFieldValues(const  SoFieldContainer  *fc,  SbBool
50                              copyConnections = FALSE)
51     SbBool              set(const char *fieldDataString)
52     void                get(SbString &fieldDataString)
53     virtual int         getFields(SoFieldList &resultList) const
54     virtual SoField *   getField(const SbName &fieldName) const
55     SbBool              getFieldName(const SoField *field, SbName &fieldName)
56                              const
57     SbBool              isNotifyEnabled() const
58     SbBool              enableNotify(SbBool flag)
59
60          Methods from class SoBase:
61
62     void                ref()
63     void                unref() const
64     void                unrefNoDelete() const
65     void                touch()
66     virtual SoType      getTypeId() const
67     SbBool              isOfType(SoType type) const
68     virtual void        setName(const SbName &name)
69     virtual SbName      getName() const
70
71

DESCRIPTION

73       This  node  describes  global  environmental attributes such as ambient
74       lighting, light attenuation, and fog.
75
76       Ambient lighting is the amount of extra light impinging on each surface
77       point when the lighting model is Phong (see SoLightModel).
78
79       Light  attenuation  affects  all  subsequent  lights  in  a  scene (see
80       SoLight). It is a quadratic function of distance from a light source to
81       a  surface  point. The three coefficients are specified in the attenua‐
82       tion field. Attenuation works only for light sources with a fixed loca‐
83       tion, such as point and spot lights.
84
85       Fog has one of four types, each of which blends each surface point with
86       the specified fog color. Each type interprets the visibility  field  to
87       be  the  distance  at  which fog totally obscures objects. A visibility
88       value of 0 (the default) causes the SoEnvironment node to set up fog so
89       that  the  visibility  is the distance to the far clipping plane of the
90       current camera.
91
92       Note that this node has effect only during rendering, and that it  does
93       not inherit field values from other SoEnvironment nodes.
94

FIELDS

96     SoSFFloat           ambientIntensity
97     SoSFColor           ambientColor
98          Intensity and RGB color of ambient lighting (for Phong lighting).
99
100     SoSFVec3f           attenuation
101          Squared,  linear,  and  constant  light attenuation coefficients (in
102          that order) with respect to distance  of  light  from  surface  (for
103          Phong lighting).
104
105     SoSFEnum            fogType
106     SoSFColor           fogColor
107     SoSFFloat           fogVisibility
108          Type  of  fog,  color  of fog, and visibility distance, which is the
109          distance at which fog totally obscures objects.
110
111

METHODS

113                         SoEnvironment()
114          Creates an environment node with default settings.
115
116     static SoType       getClassTypeId()
117          Returns type identifier for this class.
118
119

ACTION BEHAVIOR

121       SoGLRenderAction
122          Sets the current environment parameters to those specified with this
123          node. Successive geometries will be rendered using this environment.
124
125

FILE FORMAT/DEFAULTS

127       Environment {
128          ambientIntensity  0.2
129          ambientColor      1 1 1
130          attenuation       0 0 1
131          fogType           NONE
132          fogColor          1 1 1
133          fogVisibility     0
134     }
135

SEE ALSO

137       SoLight, SoLightModel
138
139
140
141
142                                                          SoEnvironment(3IV)()
Impressum