Man Linux: Main Page and Category List

NAME

       SoShadowSpotLight -

       The SoShadowSpotLight class is a node for setting up a spot light which
       casts shadows.

SYNOPSIS

       #include <Inventor/annex/FXViz/nodes/SoShadowSpotLight.h>

       Inherits SoSpotLight.

   Public Member Functions
       SoShadowSpotLight (void)
       virtual void GLRender (SoGLRenderAction *action)

   Static Public Member Functions
       static void initClass (void)

   Public Attributes
       SoSFNode shadowMapScene
       SoSFFloat nearDistance
       SoSFFloat farDistance

   Protected Member Functions
       virtual ~SoShadowSpotLight ()

Detailed Description

       The SoShadowSpotLight class is a node for setting up a spot light which
       casts shadows.

       This node can be used instead of a normal SpotLight if you need to
       improve the performance by supplying a simplified scene graph to be
       used when rendering the shadow map(s). For instance, the shadow map
       scene graph doesn’t need any textures or materials, and any non-casters
       can also be excluded from this scene graph. It’s more optimal to use
       this node than to use the SoShadowStyle node to control this, at the
       cost of some extra application complexity.

       It’s especially useful if you have a scene with few shadow caster nodes
       and lots of shadow receiver nodes.

       Currently, this node must be placed somewhere in the SoShadowGroup
       subgraph to cast shadows.

       FILE FORMAT/DEFAULTS:

           ShadowSpotLight {
             shadowMapScene NULL
             nearDistance -1
             farDistance -1
           }

       Here is the the example from SoShadowGroup, modified to use
       SoShadowSpotLight instead of a normal SoSpotLight. Notice that only the
       sphere casts shadows.

         DirectionalLight { direction 0 0 -1 intensity 0.2 }

         ShadowGroup {
           quality 1 # to get per pixel lighting

           ShadowSpotLight {
             location -8 -8 8.0
             direction 1 1 -1
             cutOffAngle 0.35
             dropOffRate 0.7

             shadowMapScene
             DEF sphere Separator {
                 Complexity { value 1.0 }
                 Material { diffuseColor 1 1 0 specularColor 1 1 1 shininess 0.9 }
                 Shuttle { translation0 -3 1 0 translation1 3 -5 0 speed 0.25 on TRUE }
                 Translation { translation -5 0 2 }
                 Sphere { radius 2.0 }
               }
           }
           # need to insert the sphere in the regular scene graph as well
           USE sphere

           Separator {
             Material { diffuseColor 1 0 0 specularColor 1 1 1 shininess 0.9 }
             Shuttle { translation0 0 -5 0 translation1 0 5 0 speed 0.15 on TRUE }
             Translation { translation 0 0 -3 }
             Cube { depth 1.8 }
           }
           Separator {
             Material { diffuseColor 0 1 0 specularColor 1 1 1 shininess 0.9 }
             Shuttle { translation0 -5 0 0 translation1 5 0 0 speed 0.3 on TRUE }
             Translation { translation 0 0 -3 }
             Cube { }
           }

           Coordinate3 { point [ -10 -10 -3, 10 -10 -3, 10 10 -3, -10 10 -3 ] }
           Material { specularColor 1 1 1 shininess 0.9 }

           Complexity { textureQuality 0.1 }
           Texture2 { image 2 2 3 0xffffff 0x225588 0x225588 0xffffff }
           Texture2Transform { scaleFactor 4 4 }
           FaceSet { numVertices 4 }
         }

       Since:
           Coin 3.0

Constructor & Destructor Documentation

   SoShadowSpotLight::SoShadowSpotLight (void) Constructor.
   SoShadowSpotLight::~SoShadowSpotLight () [protected, virtual] Destructor.

Member Function Documentation

   void SoShadowSpotLight::initClass (void) [static] Sets up initialization
       for data common to all instances of this class, like submitting
       necessary information to the Coin type system.
       Reimplemented from SoSpotLight.

   void SoShadowSpotLight::GLRender (SoGLRenderAction * action) [virtual]
       Action method for the SoGLRenderAction.
       This is called during rendering traversals. Nodes influencing the
       rendering state in any way or who wants to throw geometry primitives at
       OpenGL overrides this method.

       Reimplemented from SoSpotLight.

Author

       Generated automatically by Doxygen for Coin from the source code.