Open Inventor Reference
SoSpotLight Class Reference

Node representing a spotlight source. More...

#include <Inventor/nodes/SoSpotLight.h>

Inheritance diagram for SoSpotLight:
SoLight SoNode SoFieldContainer SoBase SoSpotLightManip

List of all members.

Public Member Functions

 SoSpotLight ()
 intensity is zero, measured from edge of cone to other edge
virtual void GLRender (SoGLRenderAction *action)
 Creates a light source during rendering.

Static Public Member Functions

static void initClass ()
 Initializes base node class.

Public Attributes

Fields
SoSFVec3f location
 Location of the source.
SoSFVec3f direction
 Principal direction of illumination (center axis of cone).
SoSFFloat dropOffRate
 Rate of intensity drop-off per change in angle from primary direction: 0 = constant intensity, 1 = very sharp drop-off.
SoSFFloat cutOffAngle
 direction: 0 = constant intensity, 1 = sharp drop-off

Protected Member Functions

virtual ~SoSpotLight ()

Detailed Description

This node defines a spotlight style light source. A spotlight is placed at a fixed location in 3-space and illuminates in a cone along a particular direction. The intensity of the illumination drops off exponentially as a ray of light diverges from this direction toward the edges of the cone. The rate of drop-off and the angle of the cone are controlled by the dropOffRate and cutOffAngle fields.

File Format/Default
SpotLight {
  on TRUE
  intensity 1
  color 1 1 1
  location 0 0 1
  direction 0 0 -1
  dropOffRate 0
  cutOffAngle 0.78539819
}
Action Behavior
SoGLRenderAction
Activates this light (if so specified) during traversal. All shape nodes that come after this light in the scene graph are illuminated by this light. The light's location is affected by the current transformation.
See Also
SoDirectionalLight, SoPointLight

Definition at line 100 of file SoSpotLight.h.


Constructor & Destructor Documentation

SoSpotLight::SoSpotLight ( )

Creates a spotlight source node with default settings.

virtual SoSpotLight::~SoSpotLight ( ) [protected, virtual]

Member Function Documentation

virtual void SoSpotLight::GLRender ( SoGLRenderAction action) [virtual]

Reimplemented from SoNode.

Reimplemented in SoSpotLightManip.

static void SoSpotLight::initClass ( ) [static]

Reimplemented from SoLight.

Reimplemented in SoSpotLightManip.


Member Data Documentation

Angle (in radians) outside of which intensity is zero, measured from the center axis of the cone to an edge.

Definition at line 122 of file SoSpotLight.h.

Definition at line 112 of file SoSpotLight.h.

Definition at line 116 of file SoSpotLight.h.

Definition at line 109 of file SoSpotLight.h.


The documentation for this class was generated from the following file: