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/a02755.html | 1225 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1225 insertions(+) create mode 100644 docs/doxygen/nel/a02755.html (limited to 'docs/doxygen/nel/a02755.html') diff --git a/docs/doxygen/nel/a02755.html b/docs/doxygen/nel/a02755.html new file mode 100644 index 00000000..51a82b98 --- /dev/null +++ b/docs/doxygen/nel/a02755.html @@ -0,0 +1,1225 @@ + + +NeL: NL3D::ULight class Reference + + + +
+

NL3D::ULight Class Reference

#include <u_light.h> +

+

Inheritance diagram for NL3D::ULight: +

+ +NL3D::CLightUser + +

Detailed Description

+ULight implementation.
Author:
Lionel Berenguier

+Nevrax France

+
Date:
2001
+ +

+ +

+Definition at line 44 of file u_light.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Types

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

Public Member Functions

Get methods.
virtual NLMISC::CRGBA getAmbiant () const=0
virtual float getConstantAttenuation () const=0
virtual float getCutoff () const=0
virtual NLMISC::CRGBA getDiffuse () const=0
virtual NLMISC::CVector getDirection () const=0
virtual float getExponent () const=0
virtual float getLinearAttenuation () const=0
virtual ULight::TLightMode getMode () const=0
virtual NLMISC::CVector getPosition () const=0
virtual float getQuadraticAttenuation () const=0
virtual NLMISC::CRGBA getSpecular () const=0
Set methods.
virtual void setAmbiant (const NLMISC::CRGBA &ambiant)=0
virtual void setConstantAttenuation (float constant)=0
virtual void setCutoff (float cutoff)=0
virtual void setDiffuse (const NLMISC::CRGBA &diffuse)=0
virtual void setDirection (const NLMISC::CVector &direction)=0
virtual void setExponent (float exponent)=0
virtual void setLinearAttenuation (float linear)=0
virtual void setMode (ULight::TLightMode mode)=0
virtual void setPosition (const NLMISC::CVector &position)=0
virtual void setQuadraticAttenuation (float quadratic)=0
virtual void setSpecular (const NLMISC::CRGBA &specular)=0
Quick setup.
virtual void setNoAttenuation ()=0
virtual void setupAttenuation (float farAttenuationBegin, float farAttenuationEnd)=0
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.

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.

virtual void setupSpotExponent (float hotSpotAngle)=0
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.


Static Public Member Functions

ULightcreateLight ()
+


Member Enumeration Documentation

+

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

+

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

+Definition at line 48 of file u_light.h. +

+

00049         { 
+00050                 // The light is directional.
+00051                 DirectionalLight, 
+00052                 
+00053                 // The light is a point.
+00054                 PointLight, 
+00055 
+00056                 // The light is a spotlight with a cone.
+00057                 SpotLight 
+00058         };
+
+


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. +

+References NL3D_MEM_LIGHT. +

+

00035 {
+00036         NL3D_MEM_LIGHT
+00037         // return the new light
+00038         return new CLightUser;
+00039 }
+
+

+ + + + +
+ + + + + + + + + +
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: +
Generated on Tue Mar 16 08:46:24 2004 for NeL by + +doxygen +1.3.6
+ + -- cgit v1.2.1