spotLight derived from ygTransform

Description: creates a spotlight with transformed position and direction

notes:
Category: Attributes
Author: Alex Hill
Revision: 11/01/02

    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 attenuation to 1,0,0
1.2 set divergence to 1.0, falloff to 0.0, and spread to 180.0
1.3 set ambient to 0,0,0
1.4 set diffuse to 1,1,1
1.5 set specular to 1,1,1
1.6 set to on

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