#include <light.h>
Inheritance diagram for kerosin::Light:
Public Member Functions | |
Light () | |
float | GetRadius () const |
gets the light radius | |
void | SetRadius (float radius) |
sets the light radius | |
virtual void | Prepare () |
Enable render settings of this light. | |
void | RenderLitMesh (boost::shared_ptr< StaticMesh > mesh) |
draw lit triangles of mesh | |
void | FlushCache () |
flush the internal cached geometry | |
void | ComputeBoundingBox () |
update the bounding box | |
void | SetAmbient (const RGBA &ambient) |
sets the ambient light intensity | |
const RGBA & | GetAmbient () |
returns the ambient light intensity | |
void | SetDiffuse (const RGBA &diffuse) |
sets the diffuse light intensity | |
const RGBA & | GetDiffuse () |
returns the diffuse light intensitye | |
void | SetSpecular (const RGBA &specular) |
sets the specular light intensity | |
const RGBA & | GetSpecular () |
returns the specular light intensity | |
Protected Member Functions | |
virtual void | OnLink () |
set up RenderServer reference | |
virtual void | OnUnlink () |
reset RenderServer reference | |
virtual void | DeterminePotentiallyLitTriangles (boost::shared_ptr< StaticMesh > &mesh, std::vector< unsigned int > &triangles) |
Protected Attributes | |
RGBA | mDiffuse |
the diffuse light intensity | |
RGBA | mAmbient |
the ambient light intensity | |
RGBA | mSpecular |
the specular light intensity | |
int | mGLLight |
the allocated OpenGL light constant | |
float | mRadius |
unsigned int | mVP |
unsigned int | mFP |
salt::Vector3f | mOldPos |
position used to invalidate the cache | |
salt::Matrix | mMeshOldTransform |
mesh transform used to invalidate the cache | |
bool | mCacheFlushed |
state of the cache | |
std::vector< unsigned int > | mTriangles |
std::vector< oxygen::IndexBuffer > | mCachedIndices |
boost::shared_ptr< OpenGLServer > | mOpenGLServer |
reference to the RenderServer |
Definition at line 34 of file light.h.
|
|
|
update the bounding box
Reimplemented from oxygen::BaseNode. Definition at line 169 of file light.cpp. References salt::AABB3::maxVec, salt::AABB3::minVec, oxygen::BaseNode::mLocalBoundingBox, mRadius, and salt::TVector3< DATATYPE, TYPE >::Set(). Here is the call graph for this function: ![]() |
|
|
|
flush the internal cached geometry
Definition at line 159 of file light.cpp. References mCachedIndices, and mCacheFlushed. Referenced by SetRadius(). |
|
returns the ambient light intensity
Definition at line 68 of file light.cpp. References mAmbient. |
|
returns the diffuse light intensitye
Definition at line 78 of file light.cpp. References mDiffuse. |
|
gets the light radius
Definition at line 52 of file light.cpp. References mRadius. |
|
returns the specular light intensity
Definition at line 88 of file light.cpp. References mSpecular. |
|
set up RenderServer reference
Reimplemented from zeitgeist::Leaf. Definition at line 175 of file light.cpp. References zeitgeist::Object::GetCore(), zeitgeist::Object::GetLog(), mFP, mGLLight, mOpenGLServer, and mVP. Here is the call graph for this function: ![]() |
|
reset RenderServer reference
Reimplemented from zeitgeist::Leaf. Definition at line 214 of file light.cpp. References mGLLight, and mOpenGLServer. |
|
Enable render settings of this light.
Definition at line 93 of file light.cpp. References oxygen::BaseNode::GetWorldTransform(), mAmbient, mDiffuse, mGLLight, and salt::Matrix::Pos(). Here is the call graph for this function: ![]() |
|
draw lit triangles of mesh
|
|
sets the ambient light intensity
Definition at line 63 of file light.cpp. References mAmbient. |
|
sets the diffuse light intensity
Definition at line 73 of file light.cpp. References mDiffuse. |
|
sets the light radius
Definition at line 57 of file light.cpp. References FlushCache(), and mRadius. Here is the call graph for this function: ![]() |
|
sets the specular light intensity
Definition at line 83 of file light.cpp. References mSpecular. |
|
the ambient light intensity
Definition at line 96 of file light.h. Referenced by GetAmbient(), Prepare(), and SetAmbient(). |
|
Definition at line 121 of file light.h. Referenced by FlushCache(). |
|
state of the cache
Definition at line 115 of file light.h. Referenced by FlushCache(). |
|
the diffuse light intensity
Definition at line 93 of file light.h. Referenced by GetDiffuse(), Prepare(), and SetDiffuse(). |
|
Definition at line 106 of file light.h. Referenced by OnLink(). |
|
the allocated OpenGL light constant
Definition at line 102 of file light.h. Referenced by OnLink(), OnUnlink(), and Prepare(). |
|
mesh transform used to invalidate the cache
|
|
position used to invalidate the cache
|
|
reference to the RenderServer
Definition at line 124 of file light.h. Referenced by OnLink(), and OnUnlink(). |
|
Definition at line 104 of file light.h. Referenced by ComputeBoundingBox(), GetRadius(), and SetRadius(). |
|
the specular light intensity
Definition at line 99 of file light.h. Referenced by GetSpecular(), and SetSpecular(). |
|
|
|
Definition at line 105 of file light.h. Referenced by OnLink(). |