LightingContext Struct Reference
[Data Structures]

Inheritance diagram for LightingContext:

TMCObject

List of all members.

Public Member Functions

 LightingContext (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
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 ( I3DExRaytracer *  raytracer,
const IllumSettings &  illum,
const RendEnv &  rendEnv,
const RTLevelInfo &  level,
const uint32  seed 
) [inline]


Member Function Documentation

const TMCColorRGBA& LightingContext::GetAmbientLight (  )  const [inline]

Returns the intensity of the ambient light in the scene

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


Member Data Documentation

FirstHitInfo* LightingContext::fFirstHitInfo

TVector2 LightingContext::fScreenCoordinates

LightingFlags LightingContext::fLightingFlags

const IllumSettings& LightingContext::fIllumSettings

lighting flags

const RendEnv& LightingContext::fRendEnv

I3DExRaytracer* LightingContext::fRaytracer

const RTLevelInfo& LightingContext::fLevel

const Ray3D* LightingContext::fIncomingRay

RayHit3D* LightingContext::fHit

boolean LightingContext::fNormalFlipped

if the normal has been flipped

TVector3 LightingContext::fNormal [mutable]

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

TVector3 LightingContext::fReflectDir [mutable]

RendContext LightingContext::fRendContext [mutable]


The documentation for this struct was generated from the following file:
Generated on Fri Aug 24 15:19:25 2007 for Carrara SDK Doc by  doxygen 1.5.3