Rasterfarm-SDK
Loading...
Searching...
No Matches
ShadowMap Class Reference

#include <shadowmap.h>

Inheritance diagram for ShadowMap:
Ortho TextureManager Surface::Render::ComponentManager Display Scene DynamicType

Classes

class  ShadowMaterial
 

Public Types

typedef Pair< Surface::Blur< Surface::Render::Color::Texel::BlurHorizontal2D5 > *, Surface::Blur< Surface::Render::Color::Texel::BlurVertical2D5 > * > BlurMaterialPair
 
typedef std::map< Surface::Material *, Surface::Render::Color::Texel::Shadow2D * > Shadow2DMap
 
- Public Types inherited from Scene
typedef List< GeometricBase * > GeometricBaseList
 

Public Member Functions

virtual void renderMaterialLists ()
 
virtual void clearMaterialLists ()
 
virtual void release (Texture *pTexture)
 
virtual void release (Surface::Material *pMaterial)
 
virtual void release (Surface::Render::Component *pComponent)
 
 ShadowMap (Scene *pSourceScene, Light *pLightObject, uint pixelWidth=Application::getWidth(), uint pixelHeight=Application::getWidth(), uint blurIterations=0)
 
virtual ~ShadowMap ()
 
virtual void addMaterials ()
 
virtual void addMaterialList (const Surface::MaterialList &pMaterial)
 
virtual void addGeometricObject (GeometricBase *pObject)
 
virtual void removeGeometricObject (GeometricBase *pObject)
 
virtual void createModel ()
 
void renderToStaticMaps (GeometricBase *pObject)
 
void renderToStaticMaps (Node *pNode)
 
void clearTexture (Texture *pTexture)
 
- Public Member Functions inherited from Ortho
 Ortho (const Attribute &attribute=Attribute(), float nearZClip=0.0f, float farZClip=100.0f)
 
const AttributegetAttribute ()
 
Matrix4f createFullView (GeometricBase *pObject)
 
- Public Member Functions inherited from Display
 Display (const Matrix4f &projectionMatrix, float nearZClip, float farZClip)
 
void addPreprocessor (Scene *pScene)
 
void removePreprocessor (Scene *pScene)
 
- Public Member Functions inherited from Scene
 Scene (const Matrix4f &projectionMatrix, float nearZClip, float farZClip)
 
virtual ~Scene ()
 
virtual void removeGeometricObject (Node *pObject)
 
void queueGeometricObject (GeometricBase *pObject)
 
void queueGeometricObject (Node *pObject)
 
bool hasFrameBuffer (FrameBuffer *pFrameBuffer)
 
void addFrameBuffer (FrameBuffer *pFrameBuffer)
 
void removeFrameBuffer (FrameBuffer *pFrameBuffer)
 
bool inDisplayArea (GeometricBase *pObject)
 
bool inDisplayArea ()
 
const Matrix4fgetModel (GeometricBase *pObject)
 
const UnorderedMap< Node *, Matrix4f > & getNodeModel () const
 
Primitive3D::AABoundingBox getAABoundingBox ()
 
Primitive3D::AABoundingBox getAABoundingBox (GeometricBase *pObject)
 
Primitive3D::AABoundingBox getNDCAABoundingBox ()
 
Primitive3D::AABoundingBox getNDCAABoundingBox (GeometricBase *pObject)
 
uint getGeometricObjectSize ()
 
const GeometricBaseListgetGeometricObject ()
 
void updateCamera ()
 
void renderMaterialList (Surface::MaterialList &pList, Surface::MaterialSortFunction sortFunction, float clipFactor=1.0f)
 
void renderMaterial (Surface::Material *pMaterial)
 
void setCamera (Camera *pCamera)
 
Camera * getCamera ()
 
const Matrix4fgetProjectionMatrix ()
 
const Matrix4fgetViewMatrix ()
 
float getNearZClip ()
 
float getFarZClip ()
 
bool hasGeometricObject (GeometricBase *pObject)
 
Vertex4f project (const Vertex3f &vertex)
 
Vertex3f unProject (const Vertex4f &vertex)
 
Vertex3f localToNdc (Vertex3f point)
 
Vertex3f ndcToLocal (Vertex3f point, float w)
 
- Public Member Functions inherited from DynamicType
 DynamicType ()
 
template<class C >
void addType ()
 
TypeID getDerivedTypeId () const
 
template<class C >
const bool isType () const
 
template<class C >
const C * cast () const
 
template<class C >
C * cast ()
 
template<class FROM , class TO >
TO * cast ()
 
template<class FROM , class TO >
const TO * cast () const
 

Public Attributes

ScenepSourceScene
 
UnorderedMap< Surface::Material *, ShadowMaterial * > pShadowMaterial
 
GeometricBaseList pRenderStaticObject
 
Shadow2DMap pCasterSampler
 
Shadow2DMap pReceiverSampler
 
Shadow2DMap pStaticReceiverSampler
 
Light * pLightObject
 
Camera camera
 
Surface::MaterialList pMaterialList
 
Primitive3D::AABoundingBox cameraBoundingBox
 
Primitive3D::AABoundingBox objectsBoundingBox
 
Engine::Texture::Attribute depthTextureAttribute
 
Engine::Texture::Attribute postProcessTextureAttribute
 
UnorderedMap< Surface::Material *, PostProcessTexturePairArraypPostProcessTexture
 
PostProcessTexturePairArray pPostProcessReceiverTexture
 
UnorderedMap< Surface::Material *, Texture * > pPostProcessDepthTexture
 
TexturepDepthTexture
 
TexturepStaticShadowTexture
 
TexturepOutputTexture
 
TexturepFinalReceiverTexture
 
FrameBufferpDepthFrameBuffer
 
FrameBufferpPPFrameBuffer
 
const Matrix4f quadProjection
 
Raster::QuadpQuadObject
 
bool updateStaticShadow
 
uint blurIterations
 
BlurMaterialPair blurMaterial
 
- Public Attributes inherited from Display
Surface::MaterialList pOpaqueMaterialList
 
Surface::MaterialList pTransparentMaterialList
 
Application::SceneList pPreprocessor
 

Additional Inherited Members

- Static Public Member Functions inherited from Ortho
static Matrix4f createMatrix (float left, float right, float bottom, float top, float nearZClip, float farZClip)
 
static Matrix4f createMatrix (float aspectRatio=Application::getAspectRatio(), float scale=1.0f, float nearZClip=0.0f, float farZClip=1.0f)
 
static Matrix4f createFullView (Primitive2D::AABoundingBox box, Matrix4f projectionMatrix)
 
- Protected Attributes inherited from Ortho
Attribute attribute
 
- Protected Attributes inherited from Scene
float nearZClip
 
float farZClip
 
Matrix4f view
 
Matrix4f projectionMatrix
 
Camera * pCamera
 
GeometricBaseList pGeometricObject
 
UnorderedMap< Node *, Matrix4fnodeModel
 
List< FrameBuffer * > pFrameBuffer
 

Member Typedef Documentation

◆ BlurMaterialPair

typedef Pair< Surface::Blur< Surface::Render::Color::Texel::BlurHorizontal2D5 > *, Surface::Blur< Surface::Render::Color::Texel::BlurVertical2D5 > * > ShadowMap::BlurMaterialPair

◆ Shadow2DMap

typedef std::map< Surface::Material *, Surface::Render::Color::Texel::Shadow2D * > ShadowMap::Shadow2DMap

Constructor & Destructor Documentation

◆ ShadowMap()

ShadowMap::ShadowMap ( Scene * pSourceScene,
Light * pLightObject,
uint pixelWidth = Application::getWidth(),
uint pixelHeight = Application::getWidth(),
uint blurIterations = 0 )

◆ ~ShadowMap()

virtual ShadowMap::~ShadowMap ( )
virtual

Member Function Documentation

◆ addGeometricObject()

virtual void ShadowMap::addGeometricObject ( GeometricBase * pObject)
virtual

Raster & Render the GeometricObject in this Scene.

Parameters
TheGeometricBase object containing at least 1 Material.

Reimplemented from Scene.

◆ addMaterialList()

virtual void ShadowMap::addMaterialList ( const Surface::MaterialList & pMaterial)
virtual

Reimplemented from Display.

◆ addMaterials()

virtual void ShadowMap::addMaterials ( )
virtual

Reimplemented from Scene.

◆ clearMaterialLists()

virtual void ShadowMap::clearMaterialLists ( )
virtual

Reimplemented from Display.

◆ clearTexture()

void ShadowMap::clearTexture ( Texture * pTexture)

◆ createModel()

virtual void ShadowMap::createModel ( )
virtual

Reimplemented from Scene.

◆ release() [1/3]

virtual void ShadowMap::release ( Surface::Material * pMaterial)
virtual

◆ release() [2/3]

virtual void ShadowMap::release ( Surface::Render::Component * pComponent)
virtual

◆ release() [3/3]

virtual void ShadowMap::release ( Texture * pTexture)
virtual

◆ removeGeometricObject()

virtual void ShadowMap::removeGeometricObject ( GeometricBase * pObject)
virtual
Parameters
TheGeometricBase object containing at least 1 Material.

Reimplemented from Scene.

◆ renderMaterialLists()

virtual void ShadowMap::renderMaterialLists ( )
virtual

Reimplemented from Display.

◆ renderToStaticMaps() [1/2]

void ShadowMap::renderToStaticMaps ( GeometricBase * pObject)

Mark this object as not changing w/respect to transforms and it will only be rendered to Shadow2D components marked as static(!dynamic). NOTE: this call will trigger an update to the static maps.

◆ renderToStaticMaps() [2/2]

void ShadowMap::renderToStaticMaps ( Node * pNode)
Parameters
AllGeometric objects contained in this node will be rendered-to the static shadow-maps.

Member Data Documentation

◆ blurIterations

uint ShadowMap::blurIterations

◆ blurMaterial

BlurMaterialPair ShadowMap::blurMaterial

◆ camera

Camera ShadowMap::camera

◆ cameraBoundingBox

Primitive3D::AABoundingBox ShadowMap::cameraBoundingBox

◆ depthTextureAttribute

Engine::Texture::Attribute ShadowMap::depthTextureAttribute

◆ objectsBoundingBox

Primitive3D::AABoundingBox ShadowMap::objectsBoundingBox

◆ pCasterSampler

Shadow2DMap ShadowMap::pCasterSampler

◆ pDepthFrameBuffer

FrameBuffer* ShadowMap::pDepthFrameBuffer

◆ pDepthTexture

Texture* ShadowMap::pDepthTexture

◆ pFinalReceiverTexture

Texture* ShadowMap::pFinalReceiverTexture

◆ pLightObject

Light* ShadowMap::pLightObject

◆ pMaterialList

Surface::MaterialList ShadowMap::pMaterialList

◆ postProcessTextureAttribute

Engine::Texture::Attribute ShadowMap::postProcessTextureAttribute

◆ pOutputTexture

Texture* ShadowMap::pOutputTexture

◆ pPostProcessDepthTexture

UnorderedMap< Surface::Material *, Texture * > ShadowMap::pPostProcessDepthTexture

◆ pPostProcessReceiverTexture

PostProcessTexturePairArray ShadowMap::pPostProcessReceiverTexture

◆ pPostProcessTexture

UnorderedMap< Surface::Material *, PostProcessTexturePairArray > ShadowMap::pPostProcessTexture

◆ pPPFrameBuffer

FrameBuffer* ShadowMap::pPPFrameBuffer

◆ pQuadObject

Raster::Quad* ShadowMap::pQuadObject

◆ pReceiverSampler

Shadow2DMap ShadowMap::pReceiverSampler

◆ pRenderStaticObject

GeometricBaseList ShadowMap::pRenderStaticObject

◆ pShadowMaterial

UnorderedMap< Surface::Material *, ShadowMaterial * > ShadowMap::pShadowMaterial

◆ pSourceScene

Scene* ShadowMap::pSourceScene

◆ pStaticReceiverSampler

Shadow2DMap ShadowMap::pStaticReceiverSampler

A Material can have > 1 Shadow2D samplers and these are marked static. These samplers will only be updated per changes to the static shadow map texture.

◆ pStaticShadowTexture

Texture* ShadowMap::pStaticShadowTexture

◆ quadProjection

const Matrix4f ShadowMap::quadProjection

◆ updateStaticShadow

bool ShadowMap::updateStaticShadow

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