Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

Light

The 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 Description

See also LightModel.

Property Documentation

ambientColor : color

The ambient color of this light. The default value is black.

See also diffuseColor and specularColor.


constantAttenuation : real

The constant light attenuation factor. The default value is 1.

This parameter has no effect on a Directional light.

See also linearAttenuation and quadraticAttenuation.


diffuseColor : color

The diffuse color of this light. The default value is white.

See also ambientColor and specularColor.


direction : vector3D

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.

See also position and type.


linearAttenuation : real

The linear light attenuation factor. The default value is 0.

This parameter has no effect on a Directional light.

See also constantAttenuation and quadraticAttenuation.


position : vector3D

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.

See also direction and type.


quadraticAttenuation : real

The quadratic light attenuation factor. The default value is 0.

This parameter has no effect on a Directional light.

See also constantAttenuation and linearAttenuation.


specularColor : color

The specular color of this light. The default value is white.

See also ambientColor and diffuseColor.


spotAngle : real

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.


spotDirection : vector3D

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.


spotExponent : real

The exponent value between 0 and 128 that indicates the intensity distribution of a spot-light. The default value is 0, indicating uniform light distribution.

This parameter has no effect on a Directional light.

See also spotAngle and position.


read-onlytype : enumeration

The type of this light; Positional or Directional. The default is Directional.

See also position and direction.


Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web