|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CLightUser Class ReferenceULight implementation.
More...
#include <light_user.h>
Inheritance diagram for NL3D::CLightUser:
List of all members.
Public Methods |
|
void | setupDirectional (const NLMISC::CRGBA &ambiant, const NLMISC::CRGBA &diffuse, const NLMISC::CRGBA &specular, const NLMISC::CVector &direction, float constant=1, float linear=0, float quadratic=0) |
| Quick setup a directional light. More...
|
void | setupPointLight (const NLMISC::CRGBA &ambiant, const NLMISC::CRGBA &diffuse, const NLMISC::CRGBA &specular, const NLMISC::CVector &position, const NLMISC::CVector &direction, float constant=1, float linear=0, float quadratic=0) |
| Quick setup a point light. More...
|
void | setupSpotLight (const NLMISC::CRGBA &ambiant, const NLMISC::CRGBA &diffuse, const NLMISC::CRGBA &specular, const NLMISC::CVector &position, const NLMISC::CVector &direction, float exponent, float cutoff, float constant=1, float linear=0, float quadratic=0) |
| Quick setup a spotlight. More...
|
void | setupAttenuation (float farAttenuationBegin, float farAttenuationEnd) |
| Setup attenuation with begin and end attenuation distance. More...
|
void | setNoAttenuation () |
| Set no attenuation. More...
|
void | setupSpotExponent (float hotSpotAngle) |
| Setup spot exponent with angle of the hotspot. More...
|
|
void | setMode (ULight::TLightMode mode) |
| Set the light mode. More...
|
void | setAmbiant (const NLMISC::CRGBA &ambiant) |
| Set the ambiant color of the light. More...
|
void | setDiffuse (const NLMISC::CRGBA &diffuse) |
| Set the diffuse color of the light. More...
|
void | setSpecular (const NLMISC::CRGBA &specular) |
| Set the specular color of the light. More...
|
void | setPosition (const NLMISC::CVector &position) |
| Set the position of the light. More...
|
void | setDirection (const NLMISC::CVector &direction) |
| Set the direction of the light. More...
|
void | setExponent (float exponent) |
| Set the Intensity distribution of the light. More...
|
void | setCutoff (float cutoff) |
| Set the cutoff of the light in radian. More...
|
void | setConstantAttenuation (float constant) |
| Set constant attenuation. More...
|
void | setLinearAttenuation (float linear) |
| Set linear attenuation. More...
|
void | setQuadraticAttenuation (float quadratic) |
| Set quadratic attenuation. More...
|
|
ULight::TLightMode | getMode () const |
| Get the light mode. More...
|
NLMISC::CRGBA | getAmbiant () const |
| Get the ambiant color of the light. More...
|
NLMISC::CRGBA | getDiffuse () const |
| Get the diffuse color of the light. More...
|
NLMISC::CRGBA | getSpecular () const |
| Get the specular color of the light. More...
|
NLMISC::CVector | getPosition () const |
| Get the position of the light. More...
|
NLMISC::CVector | getDirection () const |
| Get the direction of the light. More...
|
float | getExponent () const |
| Get the exponent of the light. More...
|
float | getCutoff () const |
| Get the cutoff of the light in radian. More...
|
float | getConstantAttenuation () const |
| Get constant attenuation. More...
|
float | getLinearAttenuation () const |
| Get linear attenuation. More...
|
float | getQuadraticAttenuation () const |
| Get quadratic attenuation. More...
|
Protected Attributes |
CLight | _Light |
Friends |
class | CDriverUser |
Detailed Description
ULight implementation.
-
Author:
-
Lionel Berenguier , Nevrax France
-
Date:
-
2001
Definition at line 48 of file light_user.h.
Member Function Documentation
NLMISC::CRGBA NL3D::CLightUser::getAmbiant |
( |
|
) |
const [inline, virtual] |
|
float NL3D::CLightUser::getConstantAttenuation |
( |
|
) |
const [inline, virtual] |
|
|
Get constant attenuation.
The intensity of the light is attenuated this way: light_intensity = light_intensity / ( CONSTANT_ATTENUATION + vertex_light_distance * LINEAR_ATTENUATION + vertex_light_distance * vertex_light_distance * QUADRATIC_ATTENUATION );
Implements NL3D::ULight.
Definition at line 320 of file light_user.h.
References _Light, and NL3D_MEM_LIGHT. |
float NL3D::CLightUser::getCutoff |
( |
|
) |
const [inline, virtual] |
|
NLMISC::CRGBA NL3D::CLightUser::getDiffuse |
( |
|
) |
const [inline, virtual] |
|
float NL3D::CLightUser::getExponent |
( |
|
) |
const [inline, virtual] |
|
float NL3D::CLightUser::getLinearAttenuation |
( |
|
) |
const [inline, virtual] |
|
|
Get linear attenuation.
The intensity of the light is attenuated this way: light_intensity = light_intensity / ( CONSTANT_ATTENUATION + vertex_light_distance * LINEAR_ATTENUATION + vertex_light_distance * vertex_light_distance * QUADRATIC_ATTENUATION );
Implements NL3D::ULight.
Definition at line 333 of file light_user.h.
References _Light, and NL3D_MEM_LIGHT. |
float NL3D::CLightUser::getQuadraticAttenuation |
( |
|
) |
const [inline, virtual] |
|
|
Get quadratic attenuation.
The intensity of the light is attenuated this way: light_intensity = light_intensity / ( CONSTANT_ATTENUATION + vertex_light_distance * LINEAR_ATTENUATION + vertex_light_distance * vertex_light_distance * QUADRATIC_ATTENUATION );
Implements NL3D::ULight.
Definition at line 346 of file light_user.h.
References _Light, and NL3D_MEM_LIGHT. |
NLMISC::CRGBA NL3D::CLightUser::getSpecular |
( |
|
) |
const [inline, virtual] |
|
void NL3D::CLightUser::setAmbiant |
( |
const NLMISC::CRGBA & |
ambiant |
) |
[inline, virtual] |
|
void NL3D::CLightUser::setConstantAttenuation |
( |
float |
constant |
) |
[inline, virtual] |
|
|
Set constant attenuation.
The intensity of the light is attenuated this way: light_intensity = light_intensity / ( CONSTANT_ATTENUATION + vertex_light_distance * LINEAR_ATTENUATION + vertex_light_distance * vertex_light_distance * QUADRATIC_ATTENUATION );
Implements NL3D::ULight.
Definition at line 204 of file light_user.h.
References _Light, and NL3D_MEM_LIGHT. |
void NL3D::CLightUser::setCutoff |
( |
float |
cutoff |
) |
[inline, virtual] |
|
void NL3D::CLightUser::setDiffuse |
( |
const NLMISC::CRGBA & |
diffuse |
) |
[inline, virtual] |
|
void NL3D::CLightUser::setDirection |
( |
const NLMISC::CVector & |
direction |
) |
[inline, virtual] |
|
void NL3D::CLightUser::setExponent |
( |
float |
exponent |
) |
[inline, virtual] |
|
void NL3D::CLightUser::setLinearAttenuation |
( |
float |
linear |
) |
[inline, virtual] |
|
|
Set linear attenuation.
The intensity of the light is attenuated this way: light_intensity = light_intensity / ( CONSTANT_ATTENUATION + vertex_light_distance * LINEAR_ATTENUATION + vertex_light_distance * vertex_light_distance * QUADRATIC_ATTENUATION );
Implements NL3D::ULight.
Definition at line 217 of file light_user.h.
References _Light, and NL3D_MEM_LIGHT. |
void NL3D::CLightUser::setNoAttenuation |
( |
|
) |
[inline, virtual] |
|
void NL3D::CLightUser::setPosition |
( |
const NLMISC::CVector & |
position |
) |
[inline, virtual] |
|
void NL3D::CLightUser::setQuadraticAttenuation |
( |
float |
quadratic |
) |
[inline, virtual] |
|
|
Set quadratic attenuation.
The intensity of the light is attenuated this way: light_intensity = light_intensity / ( CONSTANT_ATTENUATION + vertex_light_distance * LINEAR_ATTENUATION + vertex_light_distance * vertex_light_distance * QUADRATIC_ATTENUATION );
Implements NL3D::ULight.
Definition at line 230 of file light_user.h.
References _Light, and NL3D_MEM_LIGHT. |
void NL3D::CLightUser::setSpecular |
( |
const NLMISC::CRGBA & |
specular |
) |
[inline, virtual] |
|
void NL3D::CLightUser::setupAttenuation |
( |
float |
farAttenuationBegin, |
|
|
float |
farAttenuationEnd |
|
) |
[inline, virtual] |
|
|
Setup attenuation with begin and end attenuation distance.
-
Parameters:
-
farAttenuationBegin |
is the distance of the begin of the attenuation (attenuation == 0.9f) |
farAttenuationEnd |
is the distance of the end of the attenuation (attenuation == 0.1f) |
Implements NL3D::ULight.
Definition at line 89 of file light_user.h.
References _Light, and NL3D_MEM_LIGHT. |
void NL3D::CLightUser::setupSpotExponent |
( |
float |
hotSpotAngle |
) |
[inline, virtual] |
|
|
Setup spot exponent with angle of the hotspot.
-
Parameters:
-
hotSpotAngle |
is the angle in radian between the axis of the spot and the vector from light where attenuation is == 0.9. |
Implements NL3D::ULight.
Definition at line 113 of file light_user.h.
References _Light, and NL3D_MEM_LIGHT. |
void NL3D::CLightUser::setupSpotLight |
( |
const NLMISC::CRGBA & |
ambiant, |
|
|
const NLMISC::CRGBA & |
diffuse, |
|
|
const NLMISC::CRGBA & |
specular, |
|
|
const NLMISC::CVector & |
position, |
|
|
const NLMISC::CVector & |
direction, |
|
|
float |
exponent, |
|
|
float |
cutoff, |
|
|
float |
constant = 1, |
|
|
float |
linear = 0, |
|
|
float |
quadratic = 0 |
|
) |
[inline, virtual] |
|
Friends And Related Function Documentation
friend class CDriverUser [friend]
|
|
Member Data Documentation
CLight NL3D::CLightUser::_Light [protected]
|
|
|
Definition at line 51 of file light_user.h.
Referenced by getAmbiant, getConstantAttenuation, getCutoff, getDiffuse, getDirection, getExponent, getLinearAttenuation, getMode, getPosition, getQuadraticAttenuation, getSpecular, setAmbiant, setConstantAttenuation, setCutoff, setDiffuse, setDirection, setExponent, setLinearAttenuation, setMode, setNoAttenuation, setPosition, setQuadraticAttenuation, setSpecular, setupAttenuation, setupDirectional, setupPointLight, setupSpotExponent, and setupSpotLight. |
The documentation for this class was generated from the following file:
|
|