NVIDIA IndeX API nvidia_logo_transpbg.gif Up
nv::index::IShading_model Class Referenceabstract

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...
 

Detailed Description

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.

Member Enumeration Documentation

 Front_face_vertex_order

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.

Member Function Documentation

 get_backface_culling()

virtual bool nv::index::IShading_model::get_backface_culling ( ) const
pure virtual

Query if back-face culling is enabled.

Returns
Returns true if back-face culling is enabled.

 get_double_sided_lighting()

virtual bool nv::index::IShading_model::get_double_sided_lighting ( ) const
pure virtual

Query if double-sided lighting is enabled.

Returns
Returns true if the double-sided lighting is enabled.

 get_front_face_vertex_order()

virtual Front_face_vertex_order nv::index::IShading_model::get_front_face_vertex_order ( ) const
pure virtual

Query the current vertex-ordering of front-facing polygons.

Returns
Returns current vertex-ordering mode of front-facing polygons.

 set_backface_culling()

virtual void nv::index::IShading_model::set_backface_culling ( bool  backface_cull)
pure virtual

By default, back-face culling is disabled but can be enabled using set_backface_culling().

Parameters
[in]backface_cullIf true, then back-face culling will be enabled.

 set_double_sided_lighting()

virtual void nv::index::IShading_model::set_double_sided_lighting ( bool  double_sided)
pure virtual

By default, double-sided lighting is disabled but can be enabled using set_double_sided_lighting().

Parameters
[in]double_sidedIf true, then double-sided lighting will be enabled.

 set_front_face_vertex_order()

virtual void nv::index::IShading_model::set_front_face_vertex_order ( Front_face_vertex_order  order)
pure virtual

Sets the vertex-ordering of front-facing polygons.

By default counter-clockwise vertex ordering is used (FRONT_FACE_CCW).

Parameters
[in]orderThe new vertex-ordering used for front-facing polygons.

The documentation for this class was generated from the following file: