21SShadowManager::SShadowManager()
25SShadowManager::SShadowManager(
SScene* parent)
31 currentShadowSystem = 0;
35 textureFadeStart = 0.7f;
36 textureFadeEnd = 0.9f;
39 ogreScene->setShadowTextureSize(textureSize);
40 ogreScene->setShadowDirectionalLightExtrusionDistance(50);
46 ogreScene->setShadowTechnique(Ogre::SHADOWTYPE_NONE);
78 return shadowLightingTechnique;
84 if (technique == shadowLightingTechnique)
87 shadowLightingTechnique = technique;
88 if (currentShadowSystem != 0)
103 SO3_SAFE_DELETE(currentShadowSystem);
108 ogreScene->setShadowTechnique(Ogre::SHADOWTYPE_NONE);
125#ifdef SO3_BUILD_DEFERRED
147 if (currentShadowSystem != 0)
169 return ogreScene->getShadowFarDistance();
174 return ogreScene->getShadowDirectionalLightExtrusionDistance();
179 ogreScene->setShadowDirectionalLightExtrusionDistance((value == 0.0) ?
ogreScene->getShadowFarDistance() + 50.0f : value);
189 textureFadeStart = fade;
190 ogreScene->setShadowTextureFadeStart(fade);
195 return textureFadeStart;
200 textureFadeEnd = fade;
201 ogreScene->setShadowTextureFadeEnd(fade);
206 return textureFadeEnd;
211 ogreScene->setShadowTextureSelfShadow(state);
216 return ogreScene->getShadowTextureSelfShadow();
221 if (quality != currentQuality)
223 currentQuality = quality;
234 return currentQuality;
239 if (currentShadowSystem != 0)
245 if (currentShadowSystem != 0)
251 if (currentShadowSystem != 0)
void UpdateLightsShadowParameters()
Ogre::SceneManager * GetOgreScenePointer()
static bool CheckSystemCompatibility()
virtual void UpdateShadowTechnique()=0
virtual void UpdateShadowMaterial(Ogre::Technique *tech)
virtual void RemoveMaterialPass(Ogre::Technique *tech)
SShadowManager::ShadowType GetShadowType()
virtual bool IsShadowMaterialPass(Ogre::Pass *pass)
static bool CheckSystemCompatibility()
float GetShadowFarDistance()
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)
ShadowType GetShadowType()
float GetShadowFadeStart()
void SetSelfShadow(const bool &state)
void SetShadowFadeEnd(const float &fade)
void SetShadowQuality(ShadowQuality quality)
void SetLightingTechnique(const ShadowLightingType &technique)
@ SO3_MODULATIVE_SHADOWS_LIGHTING
@ SO3_INVALID_SHADOWS_LIGHTING
void SetShadowFarDistance(const float &dist)
void SetTextureSize(const int &size)
SScene * GetParentScene()
bool IsShadowMaterialPass(Ogre::Pass *pass)
ShadowQuality GetShadowQuality()
void SetShadowDirectionalLightExtrusionDistance(const float &value)
Ogre::SceneManager * ogreScene
@ SO3_SHADOWS_QUALITY_MEDIUM
static bool CheckSystemCompatibility()