QGLTwoSidedMaterial ClassThe QGLTwoSidedMaterial class implemented two-sided materials for 3D rendering. More... #include <QGLTwoSidedMaterial> Inherits: QGLAbstractMaterial. This class was introduced in Qt 4.8. Properties
Public Functions
Reimplemented Public Functions
Signals
Additional Inherited Members
Detailed DescriptionThe QGLTwoSidedMaterial class implemented two-sided materials for 3D rendering. Two-sided materials consist of a front() material and a back() material. The specific material rendered is determined by the direction faced by a fragment when it is rendered. Fragments that point towards the viewer are rendered with front(), and fragments that point away from the viewer are rendered with back(). In both cases, any textures that are used to render the material are taken from front(). If front() and back() are the same, then the same material will be used on both sides of the fragment. However, this is not exactly the same as using a one-sided QGLMaterial in place of the two-sided material. One-sided materials will render the back of the fragment as black because the normal is always pointing away from the viewer. Two-sided materials reverse the back-facing normal so that back() is lit as though it was on a front-facing face. See also QGLMaterial. Property Documentation
|
virtual QGLMaterial * | back() const |
void | setBack(QGLMaterial * material) |
Notifier signal:
void | backChanged() |
See also front(), backChanged(), and materialChanged().
This property holds the material for the front side of the object's fragments.
The default value is null, which will result in a default QGLMaterial object being used when bind() is called.
Access functions:
virtual QGLMaterial * | front() const |
void | setFront(QGLMaterial * material) |
Notifier signal:
void | frontChanged() |
See also back(), frontChanged(), and materialChanged().
Constructs a two-sided material object and attaches it to parent.
See also setFront() and setBack().
Destroys this two-sided material object.
Reimplemented from QGLAbstractMaterial::bind().
Reimplemented from QGLAbstractMaterial::isTransparent().
Reimplemented from QGLAbstractMaterial::prepareToDraw().
Reimplemented from QGLAbstractMaterial::release().