# LightingContext Struct Reference
[Data Structures]

Inheritance diagram for LightingContext:

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

boolean LightingContext::fCalculateTransparency

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

FirstHitInfo* LightingContext::fFirstHitInfo

RayHit3D* LightingContext::fHit

const IllumSettings* LightingContext::fIllumSettings

lighting flags

const Ray3D* LightingContext::fIncomingRay

const RTLevelInfo* LightingContext::fLevel

LightingFlags LightingContext::fLightingFlags

TVector3 LightingContext::fNormal`[mutable]`

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

boolean LightingContext::fNormalFlipped

if the normal has been flipped

I3DExRaytracer* LightingContext::fRaytracer

TVector3 LightingContext::fReflectDir`[mutable]`

RendContext LightingContext::fRendContext`[mutable]`

const RendEnv* LightingContext::fRendEnv

TVector2 LightingContext::fScreenCoordinates

The documentation for this struct was generated from the following file:

- RenderTypes.h