ygLight derived from ygNode | Example | Source | Header |
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