SO3Engine
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SO3::SDeferredLight Class Reference

#include <SO3DeferredLight.h>

Public Member Functions

 SDeferredLight (Ogre::Light *originalLight)
 
 ~SDeferredLight ()
 
void UpdateFromParent ()
 
void UpdateFromCamera (Ogre::Camera *camera)
 
Ogre::SimpleRenderable * GetRenderable ()
 
bool GetCastShadows ()
 
bool GetDebugRendering ()
 
void SetDebugRendering (bool enableDebugRendering)
 

Protected Member Functions

void SetAttenuation ()
 

Protected Attributes

Ogre::Light * ogreParentLight
 The light that this SDeferredLight renders.
 
Ogre::Light::LightTypes currentType
 
bool ignoreWorld
 Mode to ignore world orientation/position.
 
float radius
 Bounding sphere radius.
 
SDeferredLightImplcurrentDeferredLight
 

Detailed Description

Deferred light geometry. Each instance matches a normal light. Automaticly created by the deferred shading system.

Remarks
Unlike Ogre deferred demo, we don't choose to generate the shader for each light type from a "parametrable material template". Instead, we have one pixel and one fragment differents programs by light type. So, this class acts as an abstract class.

The benefit is that shaders code is simpler.

Definition at line 44 of file SO3DeferredLight.h.

Constructor & Destructor Documentation

◆ SDeferredLight()

SO3::SDeferredLight::SDeferredLight ( Ogre::Light *  originalLight)

Definition at line 41 of file SO3DeferredLight.cpp.

◆ ~SDeferredLight()

SO3::SDeferredLight::~SDeferredLight ( )

Definition at line 49 of file SO3DeferredLight.cpp.

Member Function Documentation

◆ GetCastShadows()

bool SO3::SDeferredLight::GetCastShadows ( )

Definition at line 131 of file SO3DeferredLight.cpp.

◆ GetDebugRendering()

bool SO3::SDeferredLight::GetDebugRendering ( )

Return if the debug rendering is activated.

Definition at line 142 of file SO3DeferredLight.cpp.

◆ GetRenderable()

Ogre::SimpleRenderable * SO3::SDeferredLight::GetRenderable ( )

Definition at line 136 of file SO3DeferredLight.cpp.

◆ SetAttenuation()

void SO3::SDeferredLight::SetAttenuation ( )
protected

Check if the camera is inside a light

Set constant, linear, quadratic Attenuation terms

Definition at line 54 of file SO3DeferredLight.cpp.

◆ SetDebugRendering()

void SO3::SDeferredLight::SetDebugRendering ( bool  enableDebugRendering)

Draw the area the light covers as a geometry, for debugging purpose.

Definition at line 147 of file SO3DeferredLight.cpp.

◆ UpdateFromCamera()

void SO3::SDeferredLight::UpdateFromCamera ( Ogre::Camera *  camera)

Update the information that is related to the camera

Definition at line 88 of file SO3DeferredLight.cpp.

◆ UpdateFromParent()

void SO3::SDeferredLight::UpdateFromParent ( )

Update the information from the light that matches this one

Definition at line 60 of file SO3DeferredLight.cpp.

Member Data Documentation

◆ currentDeferredLight

SDeferredLightImpl* SO3::SDeferredLight::currentDeferredLight
protected

Definition at line 52 of file SO3DeferredLight.h.

◆ currentType

Ogre::Light::LightTypes SO3::SDeferredLight::currentType
protected

Definition at line 49 of file SO3DeferredLight.h.

◆ ignoreWorld

bool SO3::SDeferredLight::ignoreWorld
protected

Mode to ignore world orientation/position.

Definition at line 50 of file SO3DeferredLight.h.

◆ ogreParentLight

Ogre::Light* SO3::SDeferredLight::ogreParentLight
protected

The light that this SDeferredLight renders.

Definition at line 48 of file SO3DeferredLight.h.

◆ radius

float SO3::SDeferredLight::radius
protected

Bounding sphere radius.

Definition at line 51 of file SO3DeferredLight.h.


The documentation for this class was generated from the following files: