Is a light source that lights scene objects.
TGLLightSource has parameters for the lights position, spot light direction, color, attentuation and light behaviour (eg if it shines like the sun). Usually theres a limit of 8 light sources to a scene.
Regarding light attentuation light attenuation determines how fast the light intensity decreases with distance from objects. There are three types of light attentuation that can be used by a light source. The types of attenuation include 'quadratic attentuation' where light intensity decreases proportionally to the square of the distance. This is what happens in nature. There is also 'linear attentuation' where light intensity descreases propotionally to distance and 'constant attentuation'. Constant attentuation decreases the light bright by a constant amount which has the same effect as darkening the light at the source. It is possible to have a mixture of attentuation with some light attenuating in a quadratic way while some attentuates in a linear way. Refer to
Hash .com Light Attentuation∞ article for more information.
diffuse:
TGLColor
Color of the light source
lightstyle:
TLightStyle
Whether the light is a spot light, omni light (like the sun) or parallel light (self lighting)
shining: Boolean
Turn the light on or off
spotdirection TGLCoordinates
Vector giving the direction that the spot light is pointing. If the
spotcutoff is 180 then
spotdirection has no effect. This is a more formal description:
Spotdirection contains three integer or floating-point values that specify the direction of the light in homogeneous object coordinates. Both integer and floating-point values are mapped directly. Neither integer nor floating-point values are clamped. The spot direction is transformed by the inverse of the modelview matrix when glLight is called (just as if it were a normal), and it is stored in eye coordinates. It is significant only when GL_SPOT_CUTOFF is not 180, which it is by default. The default direction is (0,0,-1).
spotcutoff: single
Specifies the angle of the spot light spread. For example if the angle is 5 degrees then the spot light spreads out like a pie slice thats got an angle of 5 degrees. The angle must be between 0 and 90 degrees for the spot light to work. A special case is 180 degrees which gives a uniform light distribution rather than in a certain direction. A more formal description is:
Spotcutoff is a single integer or floating-point value that specifies the maximum spread angle of a light source. Integer and floating-point values are mapped directly. Only values in the range [0,90] and the special value 180 are accepted. If the angle between the direction of the light and the direction from the light to the vertex being lighted is greater than the spot cutoff angle, the light is completely masked. Otherwise, its intensity is controlled by the spot exponent and the attenuation factors. The default spot cutoff is 180, resulting in uniform light distribution.
spotexponent : single
This is used to specify how focused the light source will be. Think of this in the same way as a torch focuses its light when you turn the top. A more formal explanation:
Spotexponent is a single fixed-point or floating-point value that specifies the intensity distribution of the light. Fixed-point and floating-point values are mapped directly. Only values in the range [0, 128] are accepted.
Effective light intensity is attenuated by the cosine of the angle between the direction of the light and the direction from the light to the vertex being lighted, raised to the power of the spot exponent. Thus, higher spot exponents result in a more focused light source, regardless of the spot cutoff angle (see GL_SPOT_CUTOFF, next paragraph). The initial spot exponent is 0, resulting in uniform light distribution.
ambient :
TGLColor
Background light color. It comes from all directions and is uniform and lights an object with the same color regardless of the position of the light source.
quadraticattentuation:single
Relative value determines how quickly light intensity decreases proportionally to the square of the distance.
linearattentuation:single
Relative value determines how quickly light intensity decreases proportionally to the distance.
constattenuation: single
In effect descreases the brightness of the light at the source by a relative amount.
Unit:
GLScene∞
Descends from
TGLBaseSceneObject.
|
|
Attachment
|
Size
|
Date Added
|
| | |