The interface class representing a shading model. More...
#include <ishading_model.h>
Inherits mi::base::Interface_declare< 0x8f5bc60f, ... >.
Public Types | |
enum | Front_face_vertex_order { FRONT_FACE_CCW = 0 , FRONT_FACE_CW = 1 } |
This mode specifies the orientation of front-facing polygons in, for example, triangle meshes. More... | |
Public Member Functions | |
virtual void | set_front_face_vertex_order (Front_face_vertex_order order)=0 |
Sets the vertex-ordering of front-facing polygons. More... | |
virtual Front_face_vertex_order | get_front_face_vertex_order () const =0 |
Query the current vertex-ordering of front-facing polygons. More... | |
virtual void | set_double_sided_lighting (bool double_sided)=0 |
By default, double-sided lighting is disabled but can be enabled using set_double_sided_lighting(). More... | |
virtual bool | get_double_sided_lighting () const =0 |
Query if double-sided lighting is enabled. More... | |
virtual void | set_backface_culling (bool backface_cull)=0 |
By default, back-face culling is disabled but can be enabled using set_backface_culling(). More... | |
virtual bool | get_backface_culling () const =0 |
Query if back-face culling is enabled. More... | |
The interface class representing a shading model.
A shading model defines the normal interpolation for shading that results in the illumination of a surface. The shading model is considered in combination with the material properties and the illumination model applied to the surface. Only one shading model can be active at a time. Derived classes define the shading model to use when rendering a surface.
This mode specifies the orientation of front-facing polygons in, for example, triangle meshes.
The order in which vertices are defined specifies if a polygon is front or back-facing. This ordering is important for backface culling and double-sided lighting to generate correct visual results.
Enumerator | |
---|---|
FRONT_FACE_CCW | Counter-clockwise vertex-ordering in front faces. |
FRONT_FACE_CW | Clockwise order vertex-ordering in front faces. |
|
pure virtual |
Query if back-face culling is enabled.
true
if back-face culling is enabled.
|
pure virtual |
Query if double-sided lighting is enabled.
true
if the double-sided lighting is enabled.
|
pure virtual |
Query the current vertex-ordering of front-facing polygons.
current
vertex-ordering mode of front-facing polygons.
|
pure virtual |
By default, back-face culling is disabled but can be enabled using set_backface_culling().
[in] | backface_cull | If true , then back-face culling will be enabled. |
|
pure virtual |
By default, double-sided lighting is disabled but can be enabled using set_double_sided_lighting().
[in] | double_sided | If true , then double-sided lighting will be enabled. |
|
pure virtual |
Sets the vertex-ordering of front-facing polygons.
By default counter-clockwise vertex ordering is used (FRONT_FACE_CCW).
[in] | order | The new vertex-ordering used for front-facing polygons. |