MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSL3DOpenGLLightSource Class Reference
Inheritance diagram for TSL3DOpenGLLightSource:

Public Member Functions

void modelAmbientLight (double red, double green, double blue, double alpha)
 
void modelAmbientLight (double *red, double *green, double *blue, double *alpha)
 
void modelViewer (const bool viewPoint)
 
const bool modelViewer ()
 
void modelTwoSided (const bool twoSided)
 
const bool modelTwoSided ()
 
void enabled (const bool enable)
 
- Public Member Functions inherited from TSL3DLightSource
bool enabled () const
 
void enabled (const bool enable)
 
bool isDirectional () const
 
void isDirectional (const bool dir)
 
const TSL3DCoordposition ()
 
bool position (const TSL3DCoord *pos)
 
const TSL3DCoorddirection ()
 
bool direction (const TSL3DCoord *dir)
 
void ambientLight (double red, double green, double blue, double alpha)
 
void ambientLight (double *red, double *green, double *blue, double *alpha)
 
void diffuseLight (double red, double green, double blue, double alpha)
 
void diffuseLight (double *red, double *green, double *blue, double *alpha)
 
void specularLight (double red, double green, double blue, double alpha)
 
void specularLight (double *red, double *green, double *blue, double *alpha)
 

Protected Member Functions

 TSL3DOpenGLLightSource ()
 
- Protected Member Functions inherited from TSL3DLightSource
 TSL3DLightSource ()
 

Constructor & Destructor Documentation

◆ TSL3DOpenGLLightSource()

TSL3DOpenGLLightSource::TSL3DOpenGLLightSource ( )
protected

Protected to prevent direct instantiation.

Member Function Documentation

◆ enabled()

void TSL3DOpenGLLightSource::enabled ( const bool enable)

Enable OpenGL lighting.

Parameters
enabletrue to enable a light source, false to disable it

◆ modelAmbientLight() [1/2]

void TSL3DOpenGLLightSource::modelAmbientLight ( double * red,
double * green,
double * blue,
double * alpha )

Query the lighting model's ambient light colour.

Parameters
reddouble in which red value is returned
greendouble in which green value is returned
bluedouble in which blue value is returned
alphadouble in which alpha value is returned

These values are all between 0 and 1.

◆ modelAmbientLight() [2/2]

void TSL3DOpenGLLightSource::modelAmbientLight ( double red,
double green,
double blue,
double alpha )

Set the lighting model's ambient light colour.

The default value is (0.2, 0.2, 0.2, 1.0) - which is a fairly dim white light.

Parameters
redthe red component, a value between 0 and 1
greenthe green component, a value between 0 and 1
bluethe blue component, a value between 0 and 1
alphathe alpha component, a value between 0 and 1

◆ modelTwoSided() [1/2]

const bool TSL3DOpenGLLightSource::modelTwoSided ( )

Query whether lighting is one sided or two sided.

Returns true if lighting is two sided, false if lighting is one sided (the default).

◆ modelTwoSided() [2/2]

void TSL3DOpenGLLightSource::modelTwoSided ( const bool twoSided)

Set the lighting model to use one or two sided lighting.

The default is one sided.

Parameters
twoSidedif true, enable two sided lighting, if false, lighting is one sided

◆ modelViewer() [1/2]

const bool TSL3DOpenGLLightSource::modelViewer ( )

Query the lighting model's viewpoint.

Returns true if the view point is local, false if the view point is infinite (the default).

◆ modelViewer() [2/2]

void TSL3DOpenGLLightSource::modelViewer ( const bool viewPoint)

Set the lighting model's local viewer, to either use a local or infinite viewpoint.

The default is to use an infinite view point.

Parameters
viewPointset to true for a local viewpoint, false for an infinite view point