LightingContext Struct Reference
[Data Structures]

Inheritance diagram for LightingContext:
TMCObject

List of all members.

Public Member Functions

 LightingContext ()
 LightingContext (I3DExRaytracer *raytracer, const IllumSettings &illum, const RendEnv &rendEnv, const RTLevelInfo &level, const uint32 seed)
void Init (I3DExRaytracer *raytracer, const IllumSettings &illum, const RendEnv &rendEnv, const RTLevelInfo &level, const uint32 seed)
const TMCColorRGBA & GetAmbientLight () const
void CalcReflectDir (const TVector3 &rayDir, const TVector3 &normal) const

Public Attributes

FirstHitInfo * fFirstHitInfo
TVector2 fScreenCoordinates
LightingFlags fLightingFlags
const IllumSettings * fIllumSettings
 lighting flags
const RendEnv * fRendEnv
I3DExRaytracer * fRaytracer
const RTLevelInfo * fLevel
const Ray3D * fIncomingRay
RayHit3D * fHit
boolean fNormalFlipped
 if the normal has been flipped
boolean fCalculateTransparency
TVector3 fNormal
 normal on current point after bump is applied (in global coord)
TVector3 fReflectDir
RendContext fRendContext

Detailed Description

Info about the point being shaded and the lighting of the scene. Used for shaders that implement their own lighting.


Constructor & Destructor Documentation

LightingContext::LightingContext (  )  [inline]
LightingContext::LightingContext ( I3DExRaytracer *  raytracer,
const IllumSettings &  illum,
const RendEnv &  rendEnv,
const RTLevelInfo &  level,
const uint32  seed 
) [inline]

Member Function Documentation

void LightingContext::CalcReflectDir ( const TVector3 &  rayDir,
const TVector3 &  normal 
) const [inline]

Computes the direction in which a ray reflects on a surface. The result is stored in fReflectDir

Parameters:
rayDir is the direction of the incomming ray
normal is the normal at the intersection point between ray and surface
const TMCColorRGBA& LightingContext::GetAmbientLight (  )  const [inline]

Returns the intensity of the ambient light in the scene

void LightingContext::Init ( I3DExRaytracer *  raytracer,
const IllumSettings &  illum,
const RendEnv &  rendEnv,
const RTLevelInfo &  level,
const uint32  seed 
) [inline]

Inits the lighting context


Member Data Documentation

If fCalculateTransparency is true, the lighting model must calculate the alpha channel and the straight transparency (by opposition to refracted transparency)

lighting flags

normal on current point after bump is applied (in global coord)

if the normal has been flipped


The documentation for this struct was generated from the following file:
Generated on Mon Apr 26 22:47:53 2010 for Carrara SDK Doc by  doxygen 1.6.3