logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SoEnvironment — global environment node

Action Behavior

SoGLRenderAction
          Sets  the current environment parameters to those specified with this node. Successive geometries will
          be rendered using this environment.

Description

       This node describes global environmental attributes such as ambient lighting, light attenuation, and fog.

       Ambient  lighting is the amount of extra light impinging on each surface point when the lighting model is
       Phong (see SoLightModel).

       Light attenuation affects all subsequent lights in a scene (see SoLight). It is a quadratic  function  of
       distance  from a light source to a surface point. The three coefficients are specified in the attenuation
       field. Attenuation works only for light sources with a fixed location, such as point and spot lights.

       Fog has one of four types, each of which blends each surface point with the  specified  fog  color.  Each
       type  interprets  the  visibility  field  to  be  the  distance  at which fog totally obscures objects. A
       visibility value of 0 (the default) causes the SoEnvironment node to set up fog so that the visibility is
       the distance to the far clipping plane of the current camera.

       Note that this node has effect only during rendering, and that it does  not  inherit  field  values  from
       other SoEnvironment nodes.

Fields

SoSFFloatambientIntensitySoSFColorambientColor
          Intensity and RGB color of ambient lighting (for Phong lighting).

     SoSFVec3fattenuation
          Squared,  linear, and constant light attenuation coefficients (in that order) with respect to distance
          of light from surface (for Phong lighting).

     SoSFEnumfogTypeSoSFColorfogColorSoSFFloatfogVisibility
          Type of fog, color of fog, and visibility distance,  which  is  the  distance  at  which  fog  totally
          obscures objects.

File Format/Defaults

Environment{ambientIntensity0.2ambientColor111attenuation001fogTypeNONEfogColor111fogVisibility0}

Inherits From

       SoBase > SoFieldContainer > SoNode > SoEnvironment

Methods

SoEnvironment()
          Creates an environment node with default settings.

     staticSoTypegetClassTypeId()
          Returns type identifier for this class.

Name

       SoEnvironment — global environment node

See Also

SoLight,SoLightModelSoEnvironment(3IV)()

Synopsis

#include<Inventor/nodes/SoEnvironment.h>enumFogType{SoEnvironment::NONE   No fog
          SoEnvironment::HAZE   Linear increase in opacity with distance
          SoEnvironment::FOG    Exponential increase in opacity
          SoEnvironment::SMOKE  Exponential squared increase in opacity
     }

          Fields from class SoEnvironment:

     SoSFFloatambientIntensitySoSFColorambientColorSoSFVec3fattenuationSoSFEnumfogTypeSoSFColorfogColorSoSFFloatfogVisibility

          Methods from class SoEnvironment:

                         SoEnvironment()staticSoTypegetClassTypeId()

          Methods from class SoNode:

     voidsetOverride(SbBoolstate)SbBoolisOverride()constSoNode*copy(SbBoolcopyConnections=FALSE)constvirtualSbBoolaffectsState()conststaticSoNode*getByName(constSbName&name)staticintgetByName(constSbName&name,SoNodeList&list)

          Methods from class SoFieldContainer:

     voidsetToDefaults()SbBoolhasDefaultValues()constSbBoolfieldsAreEqual(constSoFieldContainer*fc)constvoidcopyFieldValues(constSoFieldContainer*fc,SbBoolcopyConnections=FALSE)SbBoolset(constchar*fieldDataString)voidget(SbString&fieldDataString)virtualintgetFields(SoFieldList&resultList)constvirtualSoField*getField(constSbName&fieldName)constSbBoolgetFieldName(constSoField*field,SbName&fieldName)constSbBoolisNotifyEnabled()constSbBoolenableNotify(SbBoolflag)

          Methods from class SoBase:

     voidref()voidunref()constvoidunrefNoDelete()constvoidtouch()virtualSoTypegetTypeId()constSbBoolisOfType(SoTypetype)constvirtualvoidsetName(constSbName&name)virtualSbNamegetName()const

See Also