Blender V2.61 - r43446
|
#include <ntl_lighting.h>
Public Member Functions | |
ntlLightObject (ntlRenderGlobals *glob) | |
ntlLightObject (ntlRenderGlobals *glob, const ntlColor &col) | |
virtual | ~ntlLightObject () |
virtual void | prepare (bool) |
virtual ntlColor | illuminatePoint (ntlRay &reflectedRay, ntlGeometryObject *closest, ntlColor &highlight) |
const ntlColor | getShadedColor (const ntlRay &reflectedray, ntlVec3Gfx lightDir, ntlMaterial *surf, ntlColor &highlight) const |
void | setActive (bool set) |
bool | getActive () const |
void | setCastShadows (bool set) |
bool | getCastShadows () const |
void | setColor (ntlColor set) |
ntlColor | getColor () const |
void | setPosition (ntlVec3Gfx set) |
ntlVec3Gfx | getPosition () const |
Protected Attributes | |
ntlRenderGlobals * | mpGlob |
bool | mActive |
bool | mCastShadows |
ntlColor | mcColor |
ntlVec3Gfx | mvPosition |
Basic object for lights, all other light are derived from this one
Definition at line 33 of file ntl_lighting.h.
ntlLightObject::ntlLightObject | ( | ntlRenderGlobals * | glob | ) |
Default constructor
Definition at line 22 of file ntl_lighting.cpp.
ntlLightObject::ntlLightObject | ( | ntlRenderGlobals * | glob, |
const ntlColor & | col | ||
) |
Constructor with parameters
Definition at line 36 of file ntl_lighting.cpp.
ntlLightObject::~ntlLightObject | ( | ) | [virtual] |
Destructor
Definition at line 50 of file ntl_lighting.cpp.
bool ntlLightObject::getActive | ( | ) | const [inline] |
Definition at line 60 of file ntl_lighting.h.
References mActive.
bool ntlLightObject::getCastShadows | ( | ) | const [inline] |
Definition at line 63 of file ntl_lighting.h.
References mCastShadows.
ntlColor ntlLightObject::getColor | ( | void | ) | const [inline] |
ntlVec3Gfx ntlLightObject::getPosition | ( | void | ) | const [inline] |
Definition at line 70 of file ntl_lighting.h.
References mvPosition.
const ntlColor ntlLightObject::getShadedColor | ( | const ntlRay & | reflectedray, |
ntlVec3Gfx | lightDir, | ||
ntlMaterial * | surf, | ||
ntlColor & | highlight | ||
) | const |
shade the point
Definition at line 62 of file ntl_lighting.cpp.
References dot(), errorOut, getColor(), ntlRenderGlobals::getDebugOut(), ntlMaterial::getDiffuseRefl(), ntlRay::getDirection(), ntlRay::getNormal(), ntlMaterial::getSpecExponent(), ntlMaterial::getSpecular(), mpGlob, pow(), and spec().
Referenced by illuminatePoint().
ntlColor ntlLightObject::illuminatePoint | ( | ntlRay & | reflectedRay, |
ntlGeometryObject * | closest, | ||
ntlColor & | highlight | ||
) | [virtual] |
do the illumination...
Definition at line 110 of file ntl_lighting.cpp.
References errorOut, ntlRenderGlobals::getDebugOut(), ntlGeometryObject::getMaterial(), ntlRay::getOrigin(), ntlGeometryObject::getReceiveShadows(), ntlRenderGlobals::getRenderScene(), getShadedColor(), ntlScene::intersectScene(), mActive, mCastShadows, mpGlob, mvPosition, normalize(), and TRI_CASTSHADOWS.
void ntlLightObject::prepare | ( | bool | doCaustics | ) | [virtual] |
prepare light for rendering (for example shadow maps)
Definition at line 100 of file ntl_lighting.cpp.
References mActive.
void ntlLightObject::setActive | ( | bool | set | ) | [inline] |
void ntlLightObject::setCastShadows | ( | bool | set | ) | [inline] |
void ntlLightObject::setColor | ( | ntlColor | set | ) | [inline] |
void ntlLightObject::setPosition | ( | ntlVec3Gfx | set | ) | [inline] |
bool ntlLightObject::mActive [protected] |
is this light acitve?
Definition at line 78 of file ntl_lighting.h.
Referenced by getActive(), illuminatePoint(), prepare(), and setActive().
bool ntlLightObject::mCastShadows [protected] |
does it cast shadows?
Definition at line 81 of file ntl_lighting.h.
Referenced by getCastShadows(), illuminatePoint(), and setCastShadows().
ntlColor ntlLightObject::mcColor [protected] |
color of this light
Definition at line 84 of file ntl_lighting.h.
Referenced by getColor(), and setColor().
ntlRenderGlobals* ntlLightObject::mpGlob [protected] |
render globals
Definition at line 75 of file ntl_lighting.h.
Referenced by getShadedColor(), and illuminatePoint().
ntlVec3Gfx ntlLightObject::mvPosition [protected] |
light position
Definition at line 87 of file ntl_lighting.h.
Referenced by getPosition(), illuminatePoint(), and setPosition().