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

Detailed Description

Light source base class.

Once lighting has been enabled, via TSL3DOptionEnum, a TSL3DDrawingSurface can have multiple light sources.

These light sources need to have their properties set up and they need to be enabled in order to have effect.

Public Member Functions

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

 TSL3DLightSource ()
 

Constructor & Destructor Documentation

◆ TSL3DLightSource()

TSL3DLightSource::TSL3DLightSource ( )
protected

Protected to prevent direct instantiation.

Member Function Documentation

◆ ambientLight() [1/2]

void TSL3DLightSource::ambientLight ( double * red,
double * green,
double * blue,
double * alpha )

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

◆ ambientLight() [2/2]

void TSL3DLightSource::ambientLight ( double red,
double green,
double blue,
double alpha )

Set the ambient light colour.

Parameters
redred component, a value between 0 and 1
greengreen component, a value between 0 and 1
blueblue component, a value between 0 and 1
alphaalpha component, a value between 0 and 1

◆ diffuseLight() [1/2]

void TSL3DLightSource::diffuseLight ( double * red,
double * green,
double * blue,
double * alpha )

Query the diffuse 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.

◆ diffuseLight() [2/2]

void TSL3DLightSource::diffuseLight ( double red,
double green,
double blue,
double alpha )

Set the diffuse light colour.

Parameters
redred component, a value between 0 and 1
greengreen component, a value between 0 and 1
blueblue component, a value between 0 and 1
alphaalpha component, a value between 0 and 1

◆ direction() [1/2]

const TSL3DCoord * TSL3DLightSource::direction ( )

Returns the direction of a directional light source.

Returns NULL if the light source is positional.

◆ direction() [2/2]

bool TSL3DLightSource::direction ( const TSL3DCoord * dir)

Set the direction of a directional light source.

Returns true if the light source is directional. Returns false if the light source is positional.

Parameters
dirdirection of the light source

◆ enabled() [1/2]

bool TSL3DLightSource::enabled ( ) const

Returns true if the light source is enabled, false otherwise.

◆ enabled() [2/2]

void TSL3DLightSource::enabled ( const bool enable)

Enable or disable a light source.

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

◆ isDirectional() [1/2]

bool TSL3DLightSource::isDirectional ( ) const

Returns true if the light source is a directional source, false if the light source is positional.

◆ isDirectional() [2/2]

void TSL3DLightSource::isDirectional ( const bool dir)

Set whether the light source is positional or directional.

Parameters
dirset to true if light source is directional, false if light source is positional

◆ position() [1/2]

const TSL3DCoord * TSL3DLightSource::position ( )

Returns the position of a positional light source. Returns NULL if the light source is directional.

◆ position() [2/2]

bool TSL3DLightSource::position ( const TSL3DCoord * pos)

Set the position of a positional light source.

Returns true if the light source is positional. Returns false if the light source is directional.

Parameters
posthe position of the light source

◆ specularLight() [1/2]

void TSL3DLightSource::specularLight ( double * red,
double * green,
double * blue,
double * alpha )

Query the specular 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.

◆ specularLight() [2/2]

void TSL3DLightSource::specularLight ( double red,
double green,
double blue,
double alpha )

Set the specular light colour.

Parameters
redred component, a value between 0 and 1
greengreen component, a value between 0 and 1
blueblue component, a value between 0 and 1
alphaalpha component, a value between 0 and 1