Blender V2.61 - r43446
|
Properties of an geo object, describing the reflection properties of the surface. More...
#include <ntl_lighting.h>
Public Member Functions | |
ntlMaterial (void) | |
Default constructor. | |
ntlMaterial (string name, const ntlColor &Ref, const ntlColor &Amb, gfxReal Spec, gfxReal Exp, gfxReal Mirror, gfxReal Trans, gfxReal Refrac, gfxReal TAdd, const ntlColor &Att, int fres) | |
Constructor with parameters. | |
~ntlMaterial () | |
Desctructor. | |
void | calculateFresnel (const ntlVec3Gfx &dir, const ntlVec3Gfx &normal, gfxReal refIndex, gfxReal &refl, gfxReal &trans) |
Calculate reflectance and refratance from Fresnel's law. | |
string | getName () |
Returns the material name. | |
ntlColor | getDiffuseRefl () const |
Returns the reflectance. | |
ntlColor | getAmbientRefl () const |
Returns the ambience. | |
gfxReal | getSpecular () const |
Returns the specular component. | |
gfxReal | getSpecExponent () const |
Returns the specular exponent component. | |
gfxReal | getMirror () const |
Returns the mirror component. | |
gfxReal | getTransparence () const |
Returns the transparence component. | |
gfxReal | getRefracIndex () const |
Returns the refraction index component. | |
gfxReal | getTransAdditive () const |
Returns the transparency additive factor component. | |
ntlColor | getTransAttCol () const |
Returns the transparency attentuation. | |
int | getFresnel (void) |
Get Fresnel flag. | |
void | setName (string set) |
Returns the mat name. | |
void | setDiffuseRefl (ntlColor set) |
Returns the reflectance. | |
void | setAmbientRefl (ntlColor set) |
Returns the ambience. | |
void | setSpecular (gfxReal set) |
Returns the specular component. | |
void | setSpecExponent (gfxReal set) |
Returns the specular exponent component. | |
void | setMirror (gfxReal set) |
Returns the mirror component. | |
void | setTransparence (gfxReal set) |
Returns the transparence component. | |
void | setRefracIndex (gfxReal set) |
Returns the refraction index component. | |
void | setTransAdditive (gfxReal set) |
Returns the transparency additive factor component. | |
void | setTransAttCol (ntlColor set) |
Returns the transparency attentuation. | |
void | setFresnel (int set) |
Set Fresnel on/off. | |
Protected Attributes | |
string | mName |
ntlColor | mDiffuseRefl |
Vector for reflectance of each color component (used in shade() of ray object) | |
ntlColor | mAmbientRefl |
Ambient reflectance. | |
gfxReal | mSpecular |
Specular reflection intensity. | |
gfxReal | mSpecExponent |
Specular phong exponent. | |
gfxReal | mMirror |
Mirror intensity. | |
gfxReal | mTransparence |
Transparence. | |
gfxReal | mRefracIndex |
Refraction index, nu(Air) is assumed 1. | |
gfxReal | mTransAdditive |
Should transparence be additive? | |
ntlColor | mTransAttCol |
Color dependent transparency attentuation factors (negative logarithm stored) | |
int | mFresnel |
Should the transparence and reflectivity be determined by fresnel? |
Properties of an geo object, describing the reflection properties of the surface.
Definition at line 95 of file ntl_lighting.h.
ntlMaterial::ntlMaterial | ( | void | ) |
Default constructor.
Definition at line 152 of file ntl_lighting.cpp.
ntlMaterial::ntlMaterial | ( | string | name, |
const ntlColor & | Ref, | ||
const ntlColor & | Amb, | ||
gfxReal | Spec, | ||
gfxReal | Exp, | ||
gfxReal | Mirror, | ||
gfxReal | Trans, | ||
gfxReal | Refrac, | ||
gfxReal | TAdd, | ||
const ntlColor & | Att, | ||
int | fres | ||
) |
Constructor with parameters.
Sets reflectance, ambient reflection, specular intensity specular exponent, mirror intensity transparency, refraction index
Definition at line 166 of file ntl_lighting.cpp.
References mAmbientRefl, mDiffuseRefl, mFresnel, mMirror, mName, mRefracIndex, mSpecExponent, mSpecular, mTransAdditive, mTransAttCol, and mTransparence.
ntlMaterial::~ntlMaterial | ( | ) | [inline] |
Desctructor.
Definition at line 111 of file ntl_lighting.h.
void ntlMaterial::calculateFresnel | ( | const ntlVec3Gfx & | dir, |
const ntlVec3Gfx & | normal, | ||
gfxReal | refIndex, | ||
gfxReal & | refl, | ||
gfxReal & | trans | ||
) | [inline] |
Calculate reflectance and refratance from Fresnel's law.
Definition at line 217 of file ntl_lighting.h.
References dot().
Referenced by ntlRay::shade().
ntlColor ntlMaterial::getAmbientRefl | ( | ) | const [inline] |
Returns the ambience.
Definition at line 153 of file ntl_lighting.h.
References mAmbientRefl.
Referenced by ntlRay::shade().
ntlColor ntlMaterial::getDiffuseRefl | ( | ) | const [inline] |
Returns the reflectance.
Definition at line 151 of file ntl_lighting.h.
References mDiffuseRefl.
Referenced by ntlLightObject::getShadedColor().
int ntlMaterial::getFresnel | ( | void | ) | [inline] |
Get Fresnel flag.
Definition at line 169 of file ntl_lighting.h.
References mFresnel.
Referenced by ntlRay::shade().
gfxReal ntlMaterial::getMirror | ( | ) | const [inline] |
Returns the mirror component.
Definition at line 159 of file ntl_lighting.h.
References mMirror.
Referenced by ntlRay::shade().
string ntlMaterial::getName | ( | void | ) | [inline] |
gfxReal ntlMaterial::getRefracIndex | ( | ) | const [inline] |
Returns the refraction index component.
Definition at line 163 of file ntl_lighting.h.
References mRefracIndex.
Referenced by ntlRay::shade().
gfxReal ntlMaterial::getSpecExponent | ( | ) | const [inline] |
Returns the specular exponent component.
Definition at line 157 of file ntl_lighting.h.
References mSpecExponent.
Referenced by ntlLightObject::getShadedColor().
gfxReal ntlMaterial::getSpecular | ( | ) | const [inline] |
Returns the specular component.
Definition at line 155 of file ntl_lighting.h.
References mSpecular.
Referenced by ntlLightObject::getShadedColor().
gfxReal ntlMaterial::getTransAdditive | ( | ) | const [inline] |
Returns the transparency additive factor component.
Definition at line 165 of file ntl_lighting.h.
References mTransAdditive.
ntlColor ntlMaterial::getTransAttCol | ( | ) | const [inline] |
Returns the transparency attentuation.
Definition at line 167 of file ntl_lighting.h.
References mTransAttCol.
Referenced by ntlRay::shade().
gfxReal ntlMaterial::getTransparence | ( | ) | const [inline] |
Returns the transparence component.
Definition at line 161 of file ntl_lighting.h.
References mTransparence.
Referenced by ntlRay::shade().
void ntlMaterial::setAmbientRefl | ( | ntlColor | set | ) | [inline] |
void ntlMaterial::setDiffuseRefl | ( | ntlColor | set | ) | [inline] |
void ntlMaterial::setFresnel | ( | int | set | ) | [inline] |
void ntlMaterial::setMirror | ( | gfxReal | set | ) | [inline] |
void ntlMaterial::setName | ( | string | set | ) | [inline] |
void ntlMaterial::setRefracIndex | ( | gfxReal | set | ) | [inline] |
Returns the refraction index component.
Definition at line 188 of file ntl_lighting.h.
References mRefracIndex.
void ntlMaterial::setSpecExponent | ( | gfxReal | set | ) | [inline] |
Returns the specular exponent component.
Definition at line 182 of file ntl_lighting.h.
References mSpecExponent.
void ntlMaterial::setSpecular | ( | gfxReal | set | ) | [inline] |
Returns the specular component.
Definition at line 180 of file ntl_lighting.h.
References mSpecular.
void ntlMaterial::setTransAdditive | ( | gfxReal | set | ) | [inline] |
Returns the transparency additive factor component.
Definition at line 190 of file ntl_lighting.h.
References mTransAdditive.
void ntlMaterial::setTransAttCol | ( | ntlColor | set | ) | [inline] |
Returns the transparency attentuation.
Definition at line 192 of file ntl_lighting.h.
References log(), and mTransAttCol.
void ntlMaterial::setTransparence | ( | gfxReal | set | ) | [inline] |
Returns the transparence component.
Definition at line 186 of file ntl_lighting.h.
References mTransparence.
ntlColor ntlMaterial::mAmbientRefl [protected] |
Ambient reflectance.
Definition at line 125 of file ntl_lighting.h.
Referenced by getAmbientRefl(), ntlMaterial(), and setAmbientRefl().
ntlColor ntlMaterial::mDiffuseRefl [protected] |
Vector for reflectance of each color component (used in shade() of ray object)
Definition at line 123 of file ntl_lighting.h.
Referenced by getDiffuseRefl(), ntlMaterial(), and setDiffuseRefl().
int ntlMaterial::mFresnel [protected] |
Should the transparence and reflectivity be determined by fresnel?
Definition at line 142 of file ntl_lighting.h.
Referenced by getFresnel(), ntlMaterial(), and setFresnel().
gfxReal ntlMaterial::mMirror [protected] |
Mirror intensity.
Definition at line 131 of file ntl_lighting.h.
Referenced by getMirror(), ntlMaterial(), and setMirror().
string ntlMaterial::mName [protected] |
Definition at line 120 of file ntl_lighting.h.
Referenced by getName(), ntlMaterial(), and setName().
gfxReal ntlMaterial::mRefracIndex [protected] |
Refraction index, nu(Air) is assumed 1.
Definition at line 136 of file ntl_lighting.h.
Referenced by getRefracIndex(), ntlMaterial(), and setRefracIndex().
gfxReal ntlMaterial::mSpecExponent [protected] |
Specular phong exponent.
Definition at line 129 of file ntl_lighting.h.
Referenced by getSpecExponent(), ntlMaterial(), and setSpecExponent().
gfxReal ntlMaterial::mSpecular [protected] |
Specular reflection intensity.
Definition at line 127 of file ntl_lighting.h.
Referenced by getSpecular(), ntlMaterial(), and setSpecular().
gfxReal ntlMaterial::mTransAdditive [protected] |
Should transparence be additive?
Definition at line 138 of file ntl_lighting.h.
Referenced by getTransAdditive(), ntlMaterial(), and setTransAdditive().
ntlColor ntlMaterial::mTransAttCol [protected] |
Color dependent transparency attentuation factors (negative logarithm stored)
Definition at line 140 of file ntl_lighting.h.
Referenced by getTransAttCol(), ntlMaterial(), and setTransAttCol().
gfxReal ntlMaterial::mTransparence [protected] |
Transparence.
Definition at line 134 of file ntl_lighting.h.
Referenced by getTransparence(), ntlMaterial(), and setTransparence().