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  · 

QGLLightModel Class

The QGLLightModel class defines the lighting model to use for the scene. More...

 #include <QGLLightModel>

Inherits: QObject.

QGLLightModel is instantiated by QML element LightModel

This class was introduced in Qt 4.8.

Public Types

enum ColorControl { SingleColor, SeparateSpecularColor }
enum Model { OneSided, TwoSided }
enum ViewerPosition { ViewerAtInfinity, LocalViewer }

Properties

  • 1 property inherited from QObject

Public Functions

QGLLightModel(QObject * parent = 0)
~QGLLightModel()
QColor ambientSceneColor() const
QGLLightModel::ColorControl colorControl() const
QGLLightModel::Model model() const
void setAmbientSceneColor(const QColor & value)
void setColorControl(QGLLightModel::ColorControl value)
void setModel(QGLLightModel::Model value)
void setViewerPosition(QGLLightModel::ViewerPosition value)
QGLLightModel::ViewerPosition viewerPosition() const
  • 31 public functions inherited from QObject

Signals

void ambientSceneColorChanged()
void colorControlChanged()
void lightModelChanged()
void modelChanged()
void viewerPositionChanged()

Additional Inherited Members

  • 1 public slot inherited from QObject
  • 11 static public members inherited from QObject
  • 9 protected functions inherited from QObject

Detailed Description

The QGLLightModel class defines the lighting model to use for the scene.

Member Type Documentation

enum QGLLightModel::ColorControl

This enum controls the number of colors to be generated by the lighting computation.

ConstantValueDescription
QGLLightModel::SingleColor0A single color is generated by the lighting computation.
QGLLightModel::SeparateSpecularColor1A separate specular color computation is performed and then summed into the pixel color after texture mapping.

enum QGLLightModel::Model

This enum defines the type of lighting model to use: one-sided or two-sided.

ConstantValueDescription
QGLLightModel::OneSided0One-sided lighting, with the front face material used for both front and back faces.
QGLLightModel::TwoSided1Two-sided lighting, with separate front and back face materials.

enum QGLLightModel::ViewerPosition

This enum defines the position of the viewer for the purposes of lighting calculations.

ConstantValueDescription
QGLLightModel::ViewerAtInfinity0The viewer is at infinity along the -z axis.
QGLLightModel::LocalViewer1The viewer is at the local origin in eye coordinates.

Property Documentation

ambientSceneColor : QColor

This property holds the ambient color of the entire scene. The default value is (0.2, 0.2, 0.2, 1.0).

Access functions:

QColor ambientSceneColor() const
void setAmbientSceneColor(const QColor & value)

Notifier signal:

void ambientSceneColorChanged()

See also ambientSceneColorChanged().

colorControl : ColorControl

This property holds the color control mode, either SingleColor or SeparateSpecularColor. The default value is SingleColor.

If SingleColor is specified, then a single color is calculated by the lighting computation for a vertex. If SeparateSpecularColor is specified, then a separate specular color computation is performed and then summed into the pixel color after texture mapping.

Access functions:

QGLLightModel::ColorControl colorControl() const
void setColorControl(QGLLightModel::ColorControl value)

Notifier signal:

void colorControlChanged()

See also colorControlChanged().

model : Model

This property holds the lighting model to use, either OneSided or TwoSided. The default is OneSided.

Access functions:

QGLLightModel::Model model() const
void setModel(QGLLightModel::Model value)

Notifier signal:

void modelChanged()

See also modelChanged().

viewerPosition : ViewerPosition

This property holds the viewer position, either ViewerAtInfinity or LocalViewer. The default value is ViewerAtInfinity.

Access functions:

QGLLightModel::ViewerPosition viewerPosition() const
void setViewerPosition(QGLLightModel::ViewerPosition value)

Notifier signal:

void viewerPositionChanged()

See also viewerPositionChanged().

Member Function Documentation

QGLLightModel::QGLLightModel(QObject * parent = 0)

Constructs a light model object with default values and attach it to parent.

QGLLightModel::~QGLLightModel()

Destroys this light model.

void QGLLightModel::lightModelChanged() [signal]

This signal is emitted when one of model(), colorControl(), viewerPosition(), or ambientSceneColor() changes.

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