Project

General

Profile

SO3Engine
SO3ShadowManager.h
Go to the documentation of this file.
1/*
2-----------------------------------------------------------------------------
3This source file is part of OpenSpace3D
4For the latest info, see http://www.openspace3d.com
5
6Copyright (c) 2012 I-maginer
7
8This program is free software; you can redistribute it and/or modify it under
9the terms of the GNU Lesser General Public License as published by the Free Software
10Foundation; either version 2 of the License, or (at your option) any later
11version.
12
13This program is distributed in the hope that it will be useful, but WITHOUT
14ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16
17You should have received a copy of the GNU Lesser General Public License along with
18this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20http://www.gnu.org/copyleft/lesser.txt
21
22-----------------------------------------------------------------------------
23*/
24
31#ifndef __SO3SHADOWMANAGER_H__
32#define __SO3SHADOWMANAGER_H__
33
36
37namespace SO3
38{
39
43{
44public:
57
66
75protected:
77 Ogre::SceneManager* ogreScene;
78private:
79 int textureSize;
80 float textureFadeStart;
81 float textureFadeEnd;
82 ShadowLightingType shadowLightingTechnique;
83 SShadow* currentShadowSystem;
84 ShadowQuality currentQuality;
85
86public:
90 SShadowManager(SScene* parent);
91
96
99 int GetColour();
100
103 void SetColour(const int& color);
104
107 int GetTextureSize();
108
111 void SetTextureSize(const int& size);
112
116
119 void SetLightingTechnique(const ShadowLightingType& technique);
120
124
127 void SetShadowType(const ShadowType& type);
128
131 void SetShadowFarDistance(const float& dist);
132
135 float GetShadowFarDistance();
136
140
143 void SetShadowDirectionalLightExtrusionDistance(const float& value);
144
147 void SetShadowFadeStart(const float& fade);
148
151 float GetShadowFadeStart();
152
155 void SetShadowFadeEnd(const float& fade);
156
159 float GetShadowFadeEnd();
160
163 void SetSelfShadow(const bool& state);
164
167 bool GetSelfShadow();
168
172
175 void SetShadowQuality(ShadowQuality quality);
176
180
183 void UpdateShadowMaterial(Ogre::Technique* tech);
184
187 void CleanShadowMaterial(Ogre::Technique* tech);
188
191 bool IsShadowMaterialPass(Ogre::Pass* pass);
192protected:
193private:
198};
199
200}
201
202#endif
librairies include
void SetShadowFadeStart(const float &fade)
float GetShadowDirectionalLightExtrusionDistance()
void UpdateShadowMaterial(Ogre::Technique *tech)
ShadowLightingType GetLightingTechnique()
void SetShadowType(const ShadowType &type)
void SetColour(const int &color)
void CleanShadowMaterial(Ogre::Technique *tech)
void SetSelfShadow(const bool &state)
void SetShadowFadeEnd(const float &fade)
void SetShadowQuality(ShadowQuality quality)
void SetLightingTechnique(const ShadowLightingType &technique)
void SetShadowFarDistance(const float &dist)
void SetTextureSize(const int &size)
bool IsShadowMaterialPass(Ogre::Pass *pass)
ShadowQuality GetShadowQuality()
void SetShadowDirectionalLightExtrusionDistance(const float &value)
Ogre::SceneManager * ogreScene