NL3D::CSpecCubeMapFunctor Struct Reference

Inheritance diagram for NL3D::CSpecCubeMapFunctor:

NL3D::ICubeMapFunctor

Public Member Functions

 CSpecCubeMapFunctor (float exp)
virtual NLMISC::CRGBA operator() (const NLMISC::CVector &v)

Data Fields

float Exp

Constructor & Destructor Documentation

NL3D::CSpecCubeMapFunctor::CSpecCubeMapFunctor float  exp  )  [inline]
 

Definition at line 1247 of file driver_opengl_material.cpp.

References Exp.

01247 : Exp(exp) {}


Member Function Documentation

virtual NLMISC::CRGBA NL3D::CSpecCubeMapFunctor::operator() const NLMISC::CVector v  )  [inline, virtual]
 

Implements NL3D::ICubeMapFunctor.

Definition at line 1248 of file driver_opengl_material.cpp.

References Exp, uint8, and v.

01249         {
01250                 
01251                 uint8 intensity = (uint8) (255.f * ::powf(std::max(v.normed().z, 0.f), Exp));
01252                 return NLMISC::CRGBA(intensity, intensity, intensity, intensity);               
01253                 //return Exp == 1.f ? CRGBA((uint8)(v.x*127+127), (uint8)(v.y*127+127), (uint8)(v.z*127+127), 0): CRGBA::Black;
01254         }


Field Documentation

float NL3D::CSpecCubeMapFunctor::Exp
 

Definition at line 1255 of file driver_opengl_material.cpp.

Referenced by CSpecCubeMapFunctor(), and operator()().


The documentation for this struct was generated from the following file:
Generated on Tue Mar 16 07:47:18 2004 for NeL by doxygen 1.3.6