SO3Engine
include
SO3Renderer
DeferredShading
SO3DeferredLightManager.h
Go to the documentation of this file.
1
/*
2
-----------------------------------------------------------------------------
3
This source file is part of OpenSpace3D
4
For the latest info, see http://www.openspace3d.com
5
6
Copyright (c) 2012 I-maginer
7
8
This program is free software; you can redistribute it and/or modify it under
9
the terms of the GNU Lesser General Public License as published by the Free Software
10
Foundation; either version 2 of the License, or (at your option) any later
11
version.
12
13
This program is distributed in the hope that it will be useful, but WITHOUT
14
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16
17
You should have received a copy of the GNU Lesser General Public License along with
18
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19
Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20
http://www.gnu.org/copyleft/lesser.txt
21
22
-----------------------------------------------------------------------------
23
*/
24
25
#ifndef __SO3_DEFERRED_SHADING_LIGHT_MANAGER_H__
26
#define __SO3_DEFERRED_SHADING_LIGHT_MANAGER_H__
27
28
#include "
SO3DeferredLight.h
"
29
#include "
SO3DeferredLightAmbientMaterialGenerator.h
"
30
#include "
SO3DeferredLightDirectionalMaterialGenerator.h
"
31
#include "
SO3DeferredLightPointMaterialGenerator.h
"
32
#include "
SO3DeferredLightSpotMaterialGenerator.h
"
33
#include <Ogre.h>
34
35
namespace
SO3
36
{
37
40
class
SDeferredLightManager
:
public
Ogre::Singleton<SDeferredLightManager>,
41
public
Ogre::MovableObject::Listener
42
{
43
public
:
44
protected
:
45
private
:
46
typedef
std::map<Ogre::Light*, SDeferredLight*> DeferredLightList;
47
DeferredLightList deferredLightList;
48
SDeferredLightAmbientMaterialGenerator
* deferredLightAmbientMaterialGenerator;
49
SDeferredLightDirectionalMaterialGenerator
* deferredLightDirectionalMaterialGenerator;
50
SDeferredLightPointMaterialGenerator
* deferredLightPointMaterialGenerator;
51
SDeferredLightSpotMaterialGenerator
* deferredLightSpotMaterialGenerator;
52
53
public
:
57
SDeferredLightManager
();
58
62
~SDeferredLightManager
();
63
67
static
SDeferredLightManager
&
getSingleton
();
68
72
static
SDeferredLightManager
*
getSingletonPtr
();
73
77
SDeferredLight
*
CreateOrRetrieve
(Ogre::Light* existingLight);
78
81
SDeferredLightAmbientMaterialGenerator
*
GetDeferredLightAmbientMaterialGenerator
();
82
85
SDeferredLightDirectionalMaterialGenerator
*
GetDeferredLightDirectionalMaterialGenerator
();
86
89
SDeferredLightPointMaterialGenerator
*
GetDeferredLightPointMaterialGenerator
();
90
93
SDeferredLightSpotMaterialGenerator
*
GetDeferredLightSpotMaterialGenerator
();
94
97
void
UnregisterAll
();
98
99
/*
100
@copydoc Ogre::MovableObject::objectDestroyed
101
*/
102
virtual
void
objectDestroyed
(Ogre::MovableObject* light);
103
protected
:
104
private
:
105
};
106
107
}
108
109
#endif
SO3DeferredLight.h
SO3DeferredLightAmbientMaterialGenerator.h
SO3DeferredLightDirectionalMaterialGenerator.h
SO3DeferredLightPointMaterialGenerator.h
SO3DeferredLightSpotMaterialGenerator.h
SO3::SDeferredLightAmbientMaterialGenerator
Definition
SO3DeferredLightAmbientMaterialGenerator.h:34
SO3::SDeferredLightDirectionalMaterialGenerator
Definition
SO3DeferredLightDirectionalMaterialGenerator.h:34
SO3::SDeferredLight
Definition
SO3DeferredLight.h:45
SO3::SDeferredLightManager
Definition
SO3DeferredLightManager.h:42
SO3::SDeferredLightManager::getSingletonPtr
static SDeferredLightManager * getSingletonPtr()
Definition
SO3DeferredLightManager.cpp:56
SO3::SDeferredLightManager::~SDeferredLightManager
~SDeferredLightManager()
Definition
SO3DeferredLightManager.cpp:40
SO3::SDeferredLightManager::GetDeferredLightAmbientMaterialGenerator
SDeferredLightAmbientMaterialGenerator * GetDeferredLightAmbientMaterialGenerator()
Definition
SO3DeferredLightManager.cpp:94
SO3::SDeferredLightManager::getSingleton
static SDeferredLightManager & getSingleton()
Definition
SO3DeferredLightManager.cpp:61
SO3::SDeferredLightManager::GetDeferredLightDirectionalMaterialGenerator
SDeferredLightDirectionalMaterialGenerator * GetDeferredLightDirectionalMaterialGenerator()
Definition
SO3DeferredLightManager.cpp:99
SO3::SDeferredLightManager::CreateOrRetrieve
SDeferredLight * CreateOrRetrieve(Ogre::Light *existingLight)
Definition
SO3DeferredLightManager.cpp:67
SO3::SDeferredLightManager::SDeferredLightManager
SDeferredLightManager()
Definition
SO3DeferredLightManager.cpp:32
SO3::SDeferredLightManager::GetDeferredLightPointMaterialGenerator
SDeferredLightPointMaterialGenerator * GetDeferredLightPointMaterialGenerator()
Definition
SO3DeferredLightManager.cpp:104
SO3::SDeferredLightManager::UnregisterAll
void UnregisterAll()
SO3::SDeferredLightManager::objectDestroyed
virtual void objectDestroyed(Ogre::MovableObject *light)
Definition
SO3DeferredLightManager.cpp:83
SO3::SDeferredLightManager::GetDeferredLightSpotMaterialGenerator
SDeferredLightSpotMaterialGenerator * GetDeferredLightSpotMaterialGenerator()
Definition
SO3DeferredLightManager.cpp:109
SO3::SDeferredLightPointMaterialGenerator
Definition
SO3DeferredLightPointMaterialGenerator.h:34
SO3::SDeferredLightSpotMaterialGenerator
Definition
SO3DeferredLightSpotMaterialGenerator.h:34
SO3
Definition
SO3DataScol.h:38
Generated by
1.9.8