NAME

cxGeoLightModelAdd - set the light model for the current geometry object
#include <cx/Geometry.h>

enum cxGeoLightModelType { CX_GEO_LMODEL_BASE, CX_GEO_LMODEL_PHONG, CX_GEO_LMODEL_DEPTH };
void cxGeoLightModelAdd(cxGeoLightModelType type,float *nearColor,float *farColor)
integer CX_GEO_LMODEL_BASE
integer CX_GEO_LMODEL_PHONG
integer CX_GEO_LMODEL_DEPTH

parameter (CX_GEO_LMODEL_BASE = 0) parameter (CX_GEO_LMODEL_PHONG = 1) parameter (CX_GEO_LMODEL_DEPTH = 2)
subroutine cxGeoLightModelAdd(type,nearColor,farColor) integer type real nearColor(3) real farColor(3)
type
The light model type - no lighting (BASE), regular lighting (PHONG), or depth cuing (DEPTH)
nearColor
The near color if the depth cueing lighting model is chosen.
farColor
The far color if the depth cueing lighting model is chosen.
This function specifies the lighting model for the current geometry. In most cases, the default lighting environment will be acceptable. This call is provided for exceptions.

When normals are added to a geometry using cxGeoNormalAdd(3E), the lighting model is set to PHONG. This value may be overridden by calling this function.

Setting the light model many times can make rendering inefficient. If there are many objects that need to be given a lighting model, it is best to group them together with cxGeoTransformPush(3E) and apply a single call to cxGeoLightModelAdd.
Last modified: Mon Nov 6 16:33:14 GMT 2000
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1999