QGLLightModel ClassThe 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
Properties
Public Functions
Signals
Additional Inherited Members
Detailed DescriptionThe QGLLightModel class defines the lighting model to use for the scene. Member Type Documentation
|
Constant | Value | Description |
---|---|---|
QGLLightModel::SingleColor | 0 | A single color is generated by the lighting computation. |
QGLLightModel::SeparateSpecularColor | 1 | A separate specular color computation is performed and then summed into the pixel color after texture mapping. |
This enum defines the type of lighting model to use: one-sided or two-sided.
Constant | Value | Description |
---|---|---|
QGLLightModel::OneSided | 0 | One-sided lighting, with the front face material used for both front and back faces. |
QGLLightModel::TwoSided | 1 | Two-sided lighting, with separate front and back face materials. |
This enum defines the position of the viewer for the purposes of lighting calculations.
Constant | Value | Description |
---|---|---|
QGLLightModel::ViewerAtInfinity | 0 | The viewer is at infinity along the -z axis. |
QGLLightModel::LocalViewer | 1 | The viewer is at the local origin in eye coordinates. |
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().
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().
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().
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().
Constructs a light model object with default values and attach it to parent.
Destroys this light model.
This signal is emitted when one of model(), colorControl(), viewerPosition(), or ambientSceneColor() changes.