LightThe Light item represents the parameters of a light in a 3D scene. More... Inherits QtObject Light instantiates the C++ class QGLLightParameters This type was introduced in Qt 4.8. Properties
Detailed DescriptionSee also LightModel. Property DocumentationThe ambient color of this light. The default value is black. See also diffuseColor and specularColor. The constant light attenuation factor. The default value is 1. This parameter has no effect on a Directional light. See also linearAttenuation and quadraticAttenuation. The diffuse color of this light. The default value is white. See also ambientColor and specularColor. The direction of this light if it is Directional; or a zero vector if it is Positional. By default, the light is Directional. For a Directional light, the return value is the direction vector of an infinitely distant directional light, like the sun. The default value is (0, 0, 1), for a directional light pointing along the positive z-axis. OpenGL will ignore other parameters such as attenuation and spot angle when this value is set, since a directional light has no location. In order to set the direction of a spot light, use the setSpotDirection() function. Setting the direction converts the light from Positional to Directional. The linear light attenuation factor. The default value is 0. This parameter has no effect on a Directional light. See also constantAttenuation and quadraticAttenuation. The position of this light if it is Positional; or a zero vector if it is Directional. By default, the light is Directional. For a Positional light, the return value is the location in model space of the light, at some finite distance from the origin. The value is transformed by the model-view transformation when the light parameters are applied. When the light is Positional OpenGL will obey other parameters relating to the light's position, such as attenuation and spot angle. Setting the position converts the light from Directional to Positional. The quadratic light attenuation factor. The default value is 0. This parameter has no effect on a Directional light. See also constantAttenuation and linearAttenuation. The specular color of this light. The default value is white. See also ambientColor and diffuseColor. The angle over which light is spread from this light. It should be between 0 and 90 for spot lights, and 180 for uniform light distribution from a remote light source. The default value is 180. This parameter has no effect on a Directional light. The direction that a spot-light is shining in. A spotlight is a positional light that has a value other than the default for spot angle. The default value is (0, 0, -1). This parameter has no effect on a Directional light. See also spotExponent. |