SoSpotLight — node representing a spotlight source
Contents
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.
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.
Fields
SoSFVec3flocation
Location of the source.
SoSFVec3fdirection
Principal direction of illumination (center axis of cone).
SoSFFloatdropOffRate
Rate of intensity drop-off per change in angle from primary direction: 0 = constant intensity, 1 =
very sharp drop-off
SoSFFloatcutOffAngle
Angle (in radians) outside of which intensity is zero, measured from the center axis of the cone to an
edge.
File Format/Defaults
SpotLight{onTRUEintensity1color111location001direction00-1dropOffRate0cutOffAngle0.785398}Inherits From
SoBase > SoFieldContainer > SoNode > SoLight > SoSpotLight
Methods
SoSpotLight()
Creates a spotlight source node with default settings.
staticSoTypegetClassTypeId()
Returns type identifier for this class.
Name
SoSpotLight — node representing a spotlight source
See Also
SoDirectionalLight,SoPointLightSoSpotLight(3IV)()
Synopsis
#include<Inventor/nodes/SoSpotLight.h>
Fields from class SoSpotLight:
SoSFVec3flocationSoSFVec3fdirectionSoSFFloatdropOffRateSoSFFloatcutOffAngle
Fields from class SoLight:
SoSFBoolonSoSFFloatintensitySoSFColorcolor
Methods from class SoSpotLight:
SoSpotLight()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