This Node is another of the three lights property node group and defines a spotlight style light source. A spotlight can be placed at any fixed location in three-dimensional space. It will then provide a cone-shaped illumination in a specific direction.
FILE FORMAT/DEFAULTS SpotLight { on TRUE # SFBool intensity 1 # SFFloat color 1 1 1 # SFVec3f location 0 0 1 # SFVec3f direction 0 0 -1 # SFVec3f dropOffRate 0 # SFFloat cutOffAngle 0.785398 # SFFloat
}
When you use the SpotLight node, keep in mind that the intensity of the illumination will drop off as the light gets further from the source. The rate of this drop-off is controlled by the dropOffRate field. The angle of the cone of light is controlled by the cutOffAngle fields.
As explained previously, the light nodes define illumination sources that may affect any following objects in the scene graphs. These affects will depend, of course, on the current lighting style. Also mentioned earlier, light sources will be affected by the current transformation. Keep in mind, also, that a light node under a separator does not affect any objects outside that separator.
Example Use
The following code fragment is from Allnodes.wrl.
SpotLight {
on TRUE
intensity 1
color 1 1 1
location 0 0 1
direction 0 0 -1
dropOffRate 0
cutOffAngle 0.785398
}