From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- docs/doxygen/nel/classNL3D_1_1ULight.html | 1312 +++++++++++++++++++++++++++++ 1 file changed, 1312 insertions(+) create mode 100644 docs/doxygen/nel/classNL3D_1_1ULight.html (limited to 'docs/doxygen/nel/classNL3D_1_1ULight.html') diff --git a/docs/doxygen/nel/classNL3D_1_1ULight.html b/docs/doxygen/nel/classNL3D_1_1ULight.html new file mode 100644 index 00000000..fa2ec910 --- /dev/null +++ b/docs/doxygen/nel/classNL3D_1_1ULight.html @@ -0,0 +1,1312 @@ + + + + nevrax.org : docs + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
+
+ + +
+ + +
+Docs + +
+  + + + + + +
Documentation 
+ +
+Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  
+

NL3D::ULight Class Reference

ULight implementation. +More... +

+#include <u_light.h> +

+

Inheritance diagram for NL3D::ULight: +

+ +NL3D::CLightUser + +List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Types

enum  TLightMode { DirectionalLight, +PointLight, +SpotLight + }

Public Methods

Quick setup.
virtual 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)=0
 Quick setup a directional light. More...

virtual 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)=0
 Quick setup a point light. More...

virtual 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)=0
 Quick setup a spotlight. More...

virtual void setupAttenuation (float farAttenuationBegin, float farAttenuationEnd)=0
 Setup attenuation with begin and end attenuation distance. More...

virtual void setNoAttenuation ()=0
 Set no attenuation. More...

virtual void setupSpotExponent (float hotSpotAngle)=0
 Setup spot exponent with angle of the hotspot. More...

Set methods.
virtual void setMode (ULight::TLightMode mode)=0
 Set the light mode. More...

virtual void setAmbiant (const NLMISC::CRGBA &ambiant)=0
 Set the ambiant color of the light. More...

virtual void setDiffuse (const NLMISC::CRGBA &diffuse)=0
 Set the diffuse color of the light. More...

virtual void setSpecular (const NLMISC::CRGBA &specular)=0
 Set the specular color of the light. More...

virtual void setPosition (const NLMISC::CVector &position)=0
 Set the position of the light. More...

virtual void setDirection (const NLMISC::CVector &direction)=0
 Set the direction of the light. More...

virtual void setExponent (float exponent)=0
 Set the Intensity distribution of the light. More...

virtual void setCutoff (float cutoff)=0
 Set the cutoff of the light in radian. More...

virtual void setConstantAttenuation (float constant)=0
 Set constant attenuation. More...

virtual void setLinearAttenuation (float linear)=0
 Set linear attenuation. More...

virtual void setQuadraticAttenuation (float quadratic)=0
 Set quadratic attenuation. More...

Get methods.
virtual ULight::TLightMode getMode () const=0
 Get the light mode. More...

virtual NLMISC::CRGBA getAmbiant () const=0
 Get the ambiant color of the light. More...

virtual NLMISC::CRGBA getDiffuse () const=0
 Get the diffuse color of the light. More...

virtual NLMISC::CRGBA getSpecular () const=0
 Get the specular color of the light. More...

virtual NLMISC::CVector getPosition () const=0
 Get the position of the light. More...

virtual NLMISC::CVector getDirection () const=0
 Get the direction of the light. More...

virtual float getExponent () const=0
 Get the exponent of the light. More...

virtual float getCutoff () const=0
 Get the cutoff of the light in radian. More...

virtual float getConstantAttenuation () const=0
 Get constant attenuation. More...

virtual float getLinearAttenuation () const=0
 Get linear attenuation. More...

virtual float getQuadraticAttenuation () const=0
 Get quadratic attenuation. More...


Static Public Methods

ULight * createLight ()
 This is the static function create a stand alone light. More...

+

Detailed Description

+ULight implementation. +

+

+Author:
+Lionel Berenguier , Nevrax France
+Date:
+2001
+

+ +

+Definition at line 44 of file u_light.h.


Member Enumeration Documentation

+

+ + + + +
+ + +
enum NL3D::ULight::TLightMode +
+
+ + + + + +
+   + + +

+

+Enumeration values:
+ + + + +
DirectionalLight  +
PointLight  +
SpotLight  +
+
+ +

+Definition at line 48 of file u_light.h.

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + +
ULight * NL3D::ULight::createLight   [static]
+
+ + + + + +
+   + + +

+This is the static function create a stand alone light. +

+ +

+Definition at line 34 of file light_user.cpp.

+

+ + + + +
+ + + + + + + + + +
virtual NLMISC::CRGBA NL3D::ULight::getAmbiant   const [pure virtual]
+
+ + + + + +
+   + + +

+Get the ambiant color of the light. +

+ +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + +
virtual float NL3D::ULight::getConstantAttenuation   const [pure 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 ); +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + +
virtual float NL3D::ULight::getCutoff   const [pure virtual]
+
+ + + + + +
+   + + +

+Get the cutoff of the light in radian. +

+Should be between [0, Pi/2]. Used only for SpotLight. +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + +
virtual NLMISC::CRGBA NL3D::ULight::getDiffuse   const [pure virtual]
+
+ + + + + +
+   + + +

+Get the diffuse color of the light. +

+ +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + +
virtual NLMISC::CVector NL3D::ULight::getDirection   const [pure virtual]
+
+ + + + + +
+   + + +

+Get the direction of the light. +

+Used only for DirectionalLight and SpotLight. +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + +
virtual float NL3D::ULight::getExponent   const [pure virtual]
+
+ + + + + +
+   + + +

+Get the exponent of the light. +

+Used only for SpotLight. +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + +
virtual float NL3D::ULight::getLinearAttenuation   const [pure 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 ); +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + +
virtual ULight::TLightMode NL3D::ULight::getMode   const [pure virtual]
+
+ + + + + +
+   + + +

+Get the light mode. +

+ +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + +
virtual NLMISC::CVector NL3D::ULight::getPosition   const [pure virtual]
+
+ + + + + +
+   + + +

+Get the position of the light. +

+Used only for SpotLight and PointLight. +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + +
virtual float NL3D::ULight::getQuadraticAttenuation   const [pure 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 ); +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + +
virtual NLMISC::CRGBA NL3D::ULight::getSpecular   const [pure virtual]
+
+ + + + + +
+   + + +

+Get the specular color of the light. +

+ +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULight::setAmbiant const NLMISC::CRGBA  ambiant [pure virtual]
+
+ + + + + +
+   + + +

+Set the ambiant color of the light. +

+ +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULight::setConstantAttenuation float   constant [pure 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 ); +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULight::setCutoff float   cutoff [pure virtual]
+
+ + + + + +
+   + + +

+Set the cutoff of the light in radian. +

+Should be between [0, Pi/2]. Used only for SpotLight. +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULight::setDiffuse const NLMISC::CRGBA  diffuse [pure virtual]
+
+ + + + + +
+   + + +

+Set the diffuse color of the light. +

+ +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULight::setDirection const NLMISC::CVector  direction [pure virtual]
+
+ + + + + +
+   + + +

+Set the direction of the light. +

+Used only for DirectionalLight and SpotLight. +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULight::setExponent float   exponent [pure virtual]
+
+ + + + + +
+   + + +

+Set the Intensity distribution of the light. +

+Should be between [0, 1]. Used only for SpotLight. +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULight::setLinearAttenuation float   linear [pure 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 ); +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULight::setMode ULight::TLightMode   mode [pure virtual]
+
+ + + + + +
+   + + +

+Set the light mode. +

+ +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + +
virtual void NL3D::ULight::setNoAttenuation   [pure virtual]
+
+ + + + + +
+   + + +

+Set no attenuation. +

+The light will not use attenuation. +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULight::setPosition const NLMISC::CVector  position [pure virtual]
+
+ + + + + +
+   + + +

+Set the position of the light. +

+Used only for SpotLight and PointLight. +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULight::setQuadraticAttenuation float   quadratic [pure 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 ); +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULight::setSpecular const NLMISC::CRGBA  specular [pure virtual]
+
+ + + + + +
+   + + +

+Set the specular color of the light. +

+ +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
virtual void NL3D::ULight::setupAttenuation float   farAttenuationBegin,
float   farAttenuationEnd
[pure 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)
+
+

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void NL3D::ULight::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
[pure virtual]
+
+ + + + + +
+   + + +

+Quick setup a directional light. +

+ +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void NL3D::ULight::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
[pure virtual]
+
+ + + + + +
+   + + +

+Quick setup a point light. +

+ +

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULight::setupSpotExponent float   hotSpotAngle [pure 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.
+
+

+Implemented in NL3D::CLightUser.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void NL3D::ULight::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
[pure virtual]
+
+ + + + + +
+   + + +

+Quick setup a spotlight. +

+ +

+Implemented in NL3D::CLightUser.

+


The documentation for this class was generated from the following files: + + + +
                                                                                                                                                                    +
+ + -- cgit v1.2.1