spotLight derived from ygNode Example Source Header

Description: creates a point light source

notes:
Category: Attributes
Author: Alex Hill
11/01/02
Revision: 02/01/06 Alex Hill - changd net.on to net.off for save and printout

    Messages
on set the light to on
off [bool] set the light to off
toggle toggle the light state
attenuation three floats set the light attenuation (constant,linear,quadratic)
divergence float set the spotlight divergence [0:1]
falloff float set the spotlight intensity falloff [0:128]
spread float set the spotlight spread angle [0:90|180]
ambient three floats set the ambient color of the light
diffuse three floats set the diffuse color of the light
specular three floats set the specular color of the light
    Comments

constructor spotLight

1 create pfLightSource

destructor ~spotLight

method reset

1 if net master
1.1 set to on
1.2 set attenuation to 1,0,0
1.3 set divergence to 1.0, falloff to 0.0, and spread to 180.0
1.4 set ambient to 0,0,0
1.5 set diffuse to 1,1,1
1.6 set specular to 1,1,1

method message

1 set the light to on
2 set the light to off
3 toggle the light state
4 set the light attenuation (constant,linear,quadratic)
5 set the spotlight divergence [0:1]
6 set the spotlight intensity falloff [0:128]
7 set the spotlight spread angle [0:90|180]
8 set the ambient color of the light
9 set the diffuse color of the light
10 set the specular color of the light

method isOn

method on

method off

method toggle

method setAttenuation

method setCone

method setAmbient

method setDiffuse

method setSpecular