ygLight derived from ygNode Example Source Header

Description: creates a light source with direction, ambient, diffuse, and specular settings

notes:
Category: Attributes
Author: Dave Pape
11/01/01 Geoffrey Baum - added ambient and specular messages
06/28/05 Alex Hill - changed position to "direction" and removed fourth position value
Revision: 02/01/06 Alex Hill - changed net.on to net.off and moved event generation out of app function

    Messages
on set the light to on
off [bool] set the light to off
toggle toggle the light state
direction three floats set the direction from which the light comes
position (four floats | three floats) set the position from which the light comes (deprecated)
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
    Events
lightOn the light has changed to on
lightOff the light has changed to off
    Comments

constructor ygLight

1 create pfLightSource

destructor ~ygLight

method reset

1 if net master
1.1 set direction to 0,0,1
1.2 set ambient to 0,0,0
1.3 set diffuse to 1,1,1
1.4 set specular to 1,1,1
1.5 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 direction from which the light comes
5 set the position from which the light comes (deprecated)
6 set the ambient color of the light
7 set the diffuse color of the light
8 set the specular color of the light

method isOn

method on

0.1 the light has changed to on

method off

0.1 the light has changed to off

method toggle

method setPosition

method setAmbient

method setDiffuse

method setSpecular