TDME2 1.9.121
Public Member Functions | Private Attributes | List of all members
SceneLight Class Referencefinal

Scene light definition. More...

#include <tdme/engine/scene/SceneLight.h>

Collaboration diagram for SceneLight:
Collaboration graph

Public Member Functions

 SceneLight (int id)
 Public default constructor. More...
 
int getId ()
 
bool isEnabled () const
 
void setEnabled (bool enabled)
 Set enabled. More...
 
const Color4getAmbient () const
 
void setAmbient (const Color4 &ambient)
 Set ambient light component. More...
 
const Color4getDiffuse () const
 
void setDiffuse (const Color4 &diffuse)
 Set diffuse light component. More...
 
const Color4getSpecular () const
 
void setSpecular (const Color4 &specular)
 Set specular light component. More...
 
const Vector4getPosition () const
 
void setPosition (const Vector4 &position)
 Set light position. More...
 
const Vector3getSpotDirection () const
 
void setSpotDirection (const Vector3 &spotDirection)
 Set spot direction. More...
 
float getSpotExponent () const
 
void setSpotExponent (float spotExponent)
 Set up spot exponent. More...
 
float getSpotCutOff () const
 
void setSpotCutOff (float spotCutOff)
 Set spot cut off. More...
 
float getConstantAttenuation () const
 
void setConstantAttenuation (float constantAttenuation)
 Set up constant attenuation. More...
 
float getLinearAttenuation () const
 
void setLinearAttenuation (float linearAttenuation)
 Set up linear attenuation. More...
 
float getQuadraticAttenuation () const
 
void setQuadraticAttenuation (float quadraticAttenuation)
 Set up quadratic attenuation. More...
 

Private Attributes

int id
 
bool enabled
 
Color4 ambient
 
Color4 diffuse
 
Color4 specular
 
Vector4 position
 
Vector3 spotTo
 
Vector3 spotDirection
 
float spotExponent
 
float spotCutOff
 
float constantAttenuation
 
float linearAttenuation
 
float quadraticAttenuation
 

Detailed Description

Scene light definition.

Author
Andreas Drewke
Version
$Id$

Definition at line 20 of file SceneLight.h.

Constructor & Destructor Documentation

◆ SceneLight()

SceneLight ( int  id)

Public default constructor.

Parameters
idid

Definition at line 13 of file SceneLight.cpp.

Member Function Documentation

◆ getAmbient()

const Color4 & getAmbient ( ) const
inline
Returns
ambient light component

Definition at line 69 of file SceneLight.h.

◆ getConstantAttenuation()

float getConstantAttenuation ( ) const
inline
Returns
constant attenuation

Definition at line 174 of file SceneLight.h.

◆ getDiffuse()

const Color4 & getDiffuse ( ) const
inline
Returns
diffuse light component

Definition at line 84 of file SceneLight.h.

◆ getId()

int getId ( )
inline
Returns
light id

Definition at line 47 of file SceneLight.h.

◆ getLinearAttenuation()

float getLinearAttenuation ( ) const
inline
Returns
linear attenuation

Definition at line 189 of file SceneLight.h.

◆ getPosition()

const Vector4 & getPosition ( ) const
inline
Returns
position of light

Definition at line 114 of file SceneLight.h.

◆ getQuadraticAttenuation()

float getQuadraticAttenuation ( ) const
inline
Returns
quadratic attenuation

Definition at line 204 of file SceneLight.h.

◆ getSpecular()

const Color4 & getSpecular ( ) const
inline
Returns
specular light component

Definition at line 99 of file SceneLight.h.

◆ getSpotCutOff()

float getSpotCutOff ( ) const
inline
Returns
spot cutoff

Definition at line 159 of file SceneLight.h.

◆ getSpotDirection()

const Vector3 & getSpotDirection ( ) const
inline
Returns
spot direction

Definition at line 129 of file SceneLight.h.

◆ getSpotExponent()

float getSpotExponent ( ) const
inline
Returns
spot exponent

Definition at line 144 of file SceneLight.h.

◆ isEnabled()

bool isEnabled ( ) const
inline
Returns
enabled

Definition at line 54 of file SceneLight.h.

◆ setAmbient()

void setAmbient ( const Color4 ambient)
inline

Set ambient light component.

Parameters
ambientambient light component

Definition at line 77 of file SceneLight.h.

◆ setConstantAttenuation()

void setConstantAttenuation ( float  constantAttenuation)
inline

Set up constant attenuation.

Parameters
constantAttenuationconstant attenuation

Definition at line 182 of file SceneLight.h.

◆ setDiffuse()

void setDiffuse ( const Color4 diffuse)
inline

Set diffuse light component.

Parameters
diffusediffuse light

Definition at line 92 of file SceneLight.h.

◆ setEnabled()

void setEnabled ( bool  enabled)
inline

Set enabled.

Parameters
enabledenabled

Definition at line 62 of file SceneLight.h.

◆ setLinearAttenuation()

void setLinearAttenuation ( float  linearAttenuation)
inline

Set up linear attenuation.

Parameters
linearAttenuationlinear attenuation

Definition at line 197 of file SceneLight.h.

◆ setPosition()

void setPosition ( const Vector4 position)
inline

Set light position.

Parameters
positionposition of light

Definition at line 122 of file SceneLight.h.

◆ setQuadraticAttenuation()

void setQuadraticAttenuation ( float  quadraticAttenuation)
inline

Set up quadratic attenuation.

Parameters
quadraticAttenuationquadraticAttenuation

Definition at line 212 of file SceneLight.h.

◆ setSpecular()

void setSpecular ( const Color4 specular)
inline

Set specular light component.

Parameters
specularspecular light

Definition at line 107 of file SceneLight.h.

◆ setSpotCutOff()

void setSpotCutOff ( float  spotCutOff)
inline

Set spot cut off.

Parameters
spotCutOffspot cut off

Definition at line 167 of file SceneLight.h.

◆ setSpotDirection()

void setSpotDirection ( const Vector3 spotDirection)
inline

Set spot direction.

Parameters
spotDirectionspot direction

Definition at line 137 of file SceneLight.h.

◆ setSpotExponent()

void setSpotExponent ( float  spotExponent)
inline

Set up spot exponent.

Parameters
spotExponentspot exponent

Definition at line 152 of file SceneLight.h.

Member Data Documentation

◆ ambient

Color4 ambient
private

Definition at line 25 of file SceneLight.h.

◆ constantAttenuation

float constantAttenuation
private

Definition at line 33 of file SceneLight.h.

◆ diffuse

Color4 diffuse
private

Definition at line 26 of file SceneLight.h.

◆ enabled

bool enabled
private

Definition at line 24 of file SceneLight.h.

◆ id

int id
private

Definition at line 23 of file SceneLight.h.

◆ linearAttenuation

float linearAttenuation
private

Definition at line 34 of file SceneLight.h.

◆ position

Vector4 position
private

Definition at line 28 of file SceneLight.h.

◆ quadraticAttenuation

float quadraticAttenuation
private

Definition at line 35 of file SceneLight.h.

◆ specular

Color4 specular
private

Definition at line 27 of file SceneLight.h.

◆ spotCutOff

float spotCutOff
private

Definition at line 32 of file SceneLight.h.

◆ spotDirection

Vector3 spotDirection
private

Definition at line 30 of file SceneLight.h.

◆ spotExponent

float spotExponent
private

Definition at line 31 of file SceneLight.h.

◆ spotTo

Vector3 spotTo
private

Definition at line 29 of file SceneLight.h.


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