Spinning Topp Logo BlackTopp Studios
inc
scenemanager.cpp
1 // © Copyright 2010 - 2016 BlackTopp Studios Inc.
2 /* This file is part of The Mezzanine Engine.
3 
4  The Mezzanine Engine is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  The Mezzanine Engine is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with The Mezzanine Engine. If not, see <http://www.gnu.org/licenses/>.
16 */
17 /* The original authors have included a copy of the license specified above in the
18  'Docs' folder. See 'gpl.txt'
19 */
20 /* We welcome the use of the Mezzanine engine to anyone, including companies who wish to
21  Build professional software and charge for their product.
22 
23  However there are some practical restrictions, so if your project involves
24  any of the following you should contact us and we will try to work something
25  out:
26  - DRM or Copy Protection of any kind(except Copyrights)
27  - Software Patents You Do Not Wish to Freely License
28  - Any Kind of Linking to Non-GPL licensed Works
29  - Are Currently In Violation of Another Copyright Holder's GPL License
30  - If You want to change our code and not add a few hundred MB of stuff to
31  your distribution
32 
33  These and other limitations could cause serious legal problems if you ignore
34  them, so it is best to simply contact us or the Free Software Foundation, if
35  you have any questions.
36 
37  Joseph Toppi - toppij@gmail.com
38  John Blackwood - makoenergy02@gmail.com
39 */
40 #ifndef _graphicsscenemanager_cpp
41 #define _graphicsscenemanager_cpp
42 
43 #include "Graphics/scenemanager.h"
44 
45 #include "Physics/physicsmanager.h"
46 
47 #include "UI/uimanager.h"
48 
49 #include "areaeffectmanager.h"
50 #include "plane.h"
51 #include "worldobject.h"
52 #include "stringtool.h"
53 #include "entresol.h"
54 #include "world.h"
55 #include "exception.h"
56 
58 #include "Graphics/cameraproxy.h"
59 #include "Graphics/entityproxy.h"
60 #include "Graphics/lightproxy.h"
62 
63 #include <memory>
64 
65 #include <Ogre.h>
66 
67 namespace Mezzanine
68 {
69  namespace Graphics
70  {
71  /// @brief Stores internal data for the SCeneManager to keep it from cluttering the Header file
72  /// @internal
74  {
75  public:
76 
77  /// @internal
78  /// @brief A Pointer to the scenemanager this works with
80 
81  /// @internal
82  /// @brief The currently active sky, if set to anything other than SkyNone, then the 5 other skycache variable may have meaning
84 
85  // The SkyCache
86  /// @internal
87  /// @brief The Name of the Material the sky is made of
89  /// @internal
90  /// @brief The orientation of the sky, unless it's a Skyplane, this this is all 0s
92  /// @internal
93  /// @brief The name of the group the sky material is in
95  /// @internal
96  /// @brief When is the sky drawn, first or per Z-order
98  /// @internal
99  /// @brief Used to describe a skyplane instead of orientation
101 
102  /// @brief The size
103  unsigned short ShadowTextureSize;
104 
105  /// @internal
106  /// @brief Pointer for the Ogre Scenemanager, where this manager gets it's functionality.
107  Ogre::SceneManager* OgreManager;
108 
109  /// @internal
110  /// @brief Disable the sky ina given scenemanager
111  /// @param ScenePTR A pointer to the scenmanager.
112  void DisableSky(SceneManager* ScenePTR)
113  {
114  switch(ActiveSky)
115  {
117  break;
119  ScenePTR->DisableSkyPlane();
120  break;
122  ScenePTR->DisableSkyBox();
123  break;
125  ScenePTR->DisableSkyDome();
126  break;
127  }
128  ActiveSky = SceneManager::SkyNone;
129  }
130 
131  /// @internal
132  /// @brief update the information that is cached about the sky
135  String FreshSkyMaterialName = "",
136  Quaternion FreshSkyOrientation = Quaternion(0,0,0,0),
137  String FreshSkyMaterialGroupName = "",
138  Boole FreshSkyDrawnFirst = false,
139  Plane FreshSkyThePlane = Plane(Vector3(0,0,0),0)
140  )
141  {
142  ActiveSky=FreshSkyMethod;
143  SkyOrientation=FreshSkyOrientation;
144  SkyMaterialName=FreshSkyMaterialName;
145  SkyMaterialGroupName=FreshSkyMaterialGroupName;
146  SkyDrawnFirst=FreshSkyDrawnFirst;
147  SkyThePlane=FreshSkyThePlane;
148  }
149 
150  /// @internal
151  /// @brief Create One of these, the data every scenemanager needs.
152  /// @param _SM A pointer to the scenemanager this with work with in general
154  SM(_SM),
155  ActiveSky(SceneManager::SkyNone),
156  SkyMaterialName(""),
157  SkyOrientation(0,0,0,0),
158  SkyMaterialGroupName(""),
159  SkyDrawnFirst(false),
160  SkyThePlane(Vector3(0,0,0),0),
161  ShadowTextureSize(512),
162  OgreManager(0)
163  {
164 
165  }
166 
167 
168  /// @internal
169  /// @brief Destructor
171  {
172  Ogre::Root::getSingleton().destroySceneManager(OgreManager);
173  }
174  };//SceneManagerData
175 
176  ///////////////////////////////////////////////////////////////////////////////
177  // SceneManager Methods
178 
179  const String SceneManager::ImplementationName = "DefaultSceneManager";
180  const ManagerBase::ManagerType SceneManager::InterfaceType = ManagerBase::MT_SceneManager;
181 
182  SceneManager::SceneManager(World* Creator, const String& InternalManagerTypeName) :
183  WorldManager(Creator),
184  ThreadResources(NULL)
185  {
186  this->SMD = new SceneManagerData(this);
187  this->SMD->OgreManager = Ogre::Root::getSingleton().createSceneManager(InternalManagerTypeName);
188  //this->SetAmbientLight(ColourValue(0.0,0.0,0.0));
189  // const Ogre::ShadowCameraSetupPtr ShadowCam = Ogre::ShadowCameraSetupPtr(new Ogre::DefaultShadowCameraSetup());
190  //OgreManager->setShadowCameraSetup(ShadowCam);
191  }
192 
193  SceneManager::SceneManager(World* Creator, const XML::Node& XMLNode) :
194  WorldManager(Creator),
195  ThreadResources(NULL)
196  {
197  this->SMD = new SceneManagerData(this);
198 
199  XML::Attribute CurrAttrib;
200  // Get the name of the manager to construct.
201  String ManagerName;
202  XML::Node ManagerType = XMLNode.GetChild("ManagerType");
203  if(!ManagerType.Empty())
204  {
205  CurrAttrib = ManagerType.GetAttribute("TypeName");
206  if(!CurrAttrib.Empty())
207  ManagerName = CurrAttrib.AsString();
208  }
209  if(ManagerName.empty())
210  ManagerName = "Default";
211  this->SMD->OgreManager = Ogre::Root::getSingleton().createSceneManager(ManagerName+"SceneManager");
212 
213  // Setup the shadow configuration
214  Boole TextureShadows = false;
215  XML::Node ShadowSettings = XMLNode.GetChild("ShadowSettings");
216  if(!ShadowSettings.Empty())
217  {
218  String TechniqueName;
219  CurrAttrib = ShadowSettings.GetAttribute("Technique");
220  if(!CurrAttrib.Empty())
221  {
222  TechniqueName = CurrAttrib.AsString();
223  if( "StencilModulative" == TechniqueName )
225  else if( "StencilAdditive" == TechniqueName )
227  else if( "TextureModulative" == TechniqueName )
229  else if( "TextureAdditive" == TechniqueName )
231  else if( "TextureAdditiveIntegrated" == TechniqueName )
233  else if( "TextureModulativeIntegrated" == TechniqueName )
235  }
236 
237  if(!TechniqueName.empty())
238  {
239  if(String::npos != TechniqueName.find("Texture"))
240  TextureShadows = true;
241 
242  CurrAttrib = ShadowSettings.GetAttribute("ShadowColour");
243  if(!CurrAttrib)
245 
246  CurrAttrib = ShadowSettings.GetAttribute("ShadowFarDistance");
247  if(!CurrAttrib)
248  SetShadowFarDistance(CurrAttrib.AsReal());
249  }
250  }
251 
252  // Setup texture shadow settings if any are set.
253  XML::Node TextureShadowSettings = XMLNode.GetChild("TextureShadowSettings");
254  if(!TextureShadowSettings.Empty() && TextureShadows)
255  {
256  CurrAttrib = TextureShadowSettings.GetAttribute("ShadowTextureCount");
257  if(!CurrAttrib.Empty())
258  SetShadowTextureCount(CurrAttrib.AsWhole());
259 
260  CurrAttrib = TextureShadowSettings.GetAttribute("ShadowTextureSize");
261  if(!CurrAttrib.Empty())
262  SetShadowTextureSize(static_cast<unsigned short>(CurrAttrib.AsWhole()));
263  }
264  }
265 
267  {
268  this->Deinitialize();
269 
270  delete this->SMD;
271  }
272 
273  ///////////////////////////////////////////////////////////////////////////////
274  // Shadow Management
275 
277  {
278  Ogre::ShadowTechnique Type;
279  switch (Shadows)
280  {
282  Type = Ogre::SHADOWTYPE_STENCIL_MODULATIVE;
283  break;
285  Type = Ogre::SHADOWTYPE_STENCIL_ADDITIVE;
286  break;
288  Type = Ogre::SHADOWTYPE_TEXTURE_MODULATIVE;
289  break;
291  Type = Ogre::SHADOWTYPE_TEXTURE_ADDITIVE;
292  break;
294  Type = Ogre::SHADOWTYPE_TEXTURE_ADDITIVE_INTEGRATED;
295  break;
297  Type = Ogre::SHADOWTYPE_TEXTURE_MODULATIVE_INTEGRATED;
298  break;
299  default:
300  Type = Ogre::SHADOWTYPE_NONE;
301  }
302  this->SMD->OgreManager->setShadowTechnique(Type);
303  }
304 
306  {
307  Ogre::ShadowTechnique ShadowType = this->SMD->OgreManager->getShadowTechnique();
308  switch (ShadowType)
309  {
310  case Ogre::SHADOWTYPE_STENCIL_MODULATIVE:
311  return SST_Stencil_Modulative;
312  break;
313  case Ogre::SHADOWTYPE_STENCIL_ADDITIVE:
314  return SST_Stencil_Additive;
315  break;
316  case Ogre::SHADOWTYPE_TEXTURE_MODULATIVE:
317  return SST_Texture_Modulative;
318  break;
319  case Ogre::SHADOWTYPE_TEXTURE_ADDITIVE:
320  return SST_Texture_Additive;
321  break;
322  case Ogre::SHADOWTYPE_TEXTURE_ADDITIVE_INTEGRATED:
324  break;
325  case Ogre::SHADOWTYPE_TEXTURE_MODULATIVE_INTEGRATED:
327  break;
328  default:
329  return SST_None;
330  }
331  }
332 
334  { this->SMD->OgreManager->setShadowTextureCount(Count); }
335 
337  { return this->SMD->OgreManager->getShadowTextureCount(); }
338 
339  void SceneManager::SetShadowTextureSize(unsigned short Size)
340  {
341  this->SMD->OgreManager->setShadowTextureSize(Size);
342  this->SMD->ShadowTextureSize=Size;
343  }
344 
345  unsigned short SceneManager::GetShadowTextureSize() const
346  { return this->SMD->ShadowTextureSize; }
347 
349  { this->SMD->OgreManager->setShadowFarDistance(FarDist); }
350 
352  { return this->SMD->OgreManager->getShadowFarDistance(); }
353 
354  void SceneManager::SetShadowColour(const ColourValue& ShadowColour)
355  { this->SMD->OgreManager->setShadowColour(ShadowColour.GetOgreColourValue()); }
356 
358  {
359  ColourValue Shadow(this->SMD->OgreManager->getShadowColour());
360  return Shadow;
361  }
362 
363  ///////////////////////////////////////////////////////////////////////////////
364  // Sky Surface Management
365 
366  void SceneManager::CreateSkyPlane(const Plane& SkyPlane_, const String& Material, const String& Group, Real Scale, Real Tiling, Boole DrawFirst, Real Bow, int XSegments, int YSegments)
367  {
368  this->SMD->DisableSky(this);
369  this->SMD->UpdateSkyCache(SkyPlane, Material, Quaternion(0,0,0,0), Group, DrawFirst, SkyPlane_);
370  this->SMD->OgreManager->setSkyPlane(true, SkyPlane_.GetOgrePlane(), Material, Scale, Tiling, DrawFirst, Bow, XSegments, YSegments, Group);
371  }
372 
374  {
375  this->SMD->OgreManager->setSkyPlane(false, Ogre::Plane(), "");
376  }
377 
378  void SceneManager::CreateSkyBox(const String& Material, const String& Group, Real Distance, Boole DrawFirst, Quaternion Orientation)
379  {
380  this->SMD->DisableSky(this);
381  this->SMD->UpdateSkyCache(SkyBox, Material, Orientation, Group, DrawFirst);
382  this->SMD->OgreManager->setSkyBox(true, Material, Distance, DrawFirst, Orientation.GetOgreQuaternion(), Group);
383  }
384 
386  {
387  this->SMD->OgreManager->setSkyBox(false, "");
388  }
389 
390  void SceneManager::CreateSkyDome(const String& Material, const String& Group, Real Distance, Real Curvature, Real Tiling, Boole DrawFirst,
391  Quaternion Orientation, int XSegments, int YSegments)
392  {
393  this->SMD->DisableSky(this);
394  this->SMD->UpdateSkyCache(SkyDome, Material, Orientation, Group, DrawFirst);
395  this->SMD->OgreManager->setSkyDome(true, Material, Curvature, Tiling, Distance, DrawFirst, Orientation.GetOgreQuaternion(), XSegments, YSegments, -1, Group);
396  }
397 
399  {
400  this->SMD->OgreManager->setSkyDome(false, "");
401  }
402 
404  {
405  this->SMD->DisableSky(this);
406  this->SMD->UpdateSkyCache();
407  }
408 
410  { return this->SMD->ActiveSky; }
411 
412  ///////////////////////////////////////////////////////////////////////////////
413  // Creating Proxies
414 
416  {
417  return this->CreateBillboardSetProxy(20,AddToWorld);
418  }
419 
420  BillboardSetProxy* SceneManager::CreateBillboardSetProxy(const UInt32 InitialPoolSize, const Boole AddToWorld)
421  {
422  BillboardSetProxy* NewProxy = new BillboardSetProxy(this->ProxyIDGen.GenerateID(),InitialPoolSize,this);
423  this->Proxies.push_back(NewProxy);
424  if( AddToWorld ) {
425  NewProxy->AddToWorld();
426  }
427  return NewProxy;
428  }
429 
431  {
432  BillboardSetProxy* NewProxy = new BillboardSetProxy(SelfRoot,this);
433  this->ProxyIDGen.ReserveID(NewProxy->GetProxyID());
434  this->Proxies.push_back(NewProxy);
435  return NewProxy;
436  }
437 
439  {
440  CameraProxy* NewProxy = new CameraProxy(this->ProxyIDGen.GenerateID(),this);
441  this->Proxies.push_back(NewProxy);
442  return NewProxy;
443  }
444 
446  {
447  CameraProxy* NewProxy = new CameraProxy(SelfRoot,this);
448  this->ProxyIDGen.ReserveID(NewProxy->GetProxyID());
449  this->Proxies.push_back(NewProxy);
450  return NewProxy;
451  }
452 
454  {
455  EntityProxy* NewProxy = new EntityProxy(this->ProxyIDGen.GenerateID(),this);
456  this->Proxies.push_back(NewProxy);
457  if( AddToWorld ) {
458  NewProxy->AddToWorld();
459  }
460  return NewProxy;
461  }
462 
464  {
465  EntityProxy* NewProxy = new EntityProxy(this->ProxyIDGen.GenerateID(),TheMesh,this);
466  this->Proxies.push_back(NewProxy);
467  if( AddToWorld ) {
468  NewProxy->AddToWorld();
469  }
470  return NewProxy;
471  }
472 
473  EntityProxy* SceneManager::CreateEntityProxy(const String& MeshName, const String& GroupName, const Boole AddToWorld)
474  {
475  EntityProxy* NewProxy = new EntityProxy(this->ProxyIDGen.GenerateID(),MeshName,GroupName,this);
476  this->Proxies.push_back(NewProxy);
477  if( AddToWorld ) {
478  NewProxy->AddToWorld();
479  }
480  return NewProxy;
481  }
482 
484  {
485  EntityProxy* NewProxy = new EntityProxy(SelfRoot,this);
486  this->ProxyIDGen.ReserveID(NewProxy->GetProxyID());
487  this->Proxies.push_back(NewProxy);
488  return NewProxy;
489  }
490 
492  {
493  LightProxy* NewProxy = new LightProxy(this->ProxyIDGen.GenerateID(),this);
494  this->Proxies.push_back(NewProxy);
495  if( AddToWorld ) {
496  NewProxy->AddToWorld();
497  }
498  return NewProxy;
499  }
500 
502  {
503  LightProxy* NewProxy = new LightProxy(this->ProxyIDGen.GenerateID(),Type,this);
504  this->Proxies.push_back(NewProxy);
505  if( AddToWorld ) {
506  NewProxy->AddToWorld();
507  }
508  return NewProxy;
509  }
510 
512  {
513  LightProxy* NewProxy = new LightProxy(SelfRoot,this);
514  this->ProxyIDGen.ReserveID(NewProxy->GetProxyID());
515  this->Proxies.push_back(NewProxy);
516  return NewProxy;
517  }
518 
520  {
521  ParticleSystemProxy* NewProxy = new ParticleSystemProxy(this->ProxyIDGen.GenerateID(),Template,this);
522  this->Proxies.push_back(NewProxy);
523  if( AddToWorld ) {
524  NewProxy->AddToWorld();
525  }
526  return NewProxy;
527  }
528 
530  {
531  ParticleSystemProxy* NewProxy = new ParticleSystemProxy(SelfRoot,this);
532  this->ProxyIDGen.ReserveID(NewProxy->GetProxyID());
533  this->Proxies.push_back(NewProxy);
534  return NewProxy;
535  }
536 
537  ///////////////////////////////////////////////////////////////////////////////
538  // Proxy Management
539 
541  { return this->Proxies.at(Index); }
542 
544  {
545  if( Mezzanine::PT_Graphics_All_Proxies & Type ) {
546  for( ConstProxyIterator ProxIt = this->Proxies.begin() ; ProxIt != this->Proxies.end() ; ++ProxIt )
547  {
548  if( (*ProxIt)->GetProxyType() == Type ) {
549  if( 0 == Which ) return (*ProxIt);
550  else --Which;
551  }
552  }
553  }
554  return NULL;
555  }
556 
558  { return this->Proxies.size(); }
559 
561  {
562  for( ProxyIterator ProxIt = this->Proxies.begin() ; ProxIt != this->Proxies.end() ; ++ProxIt )
563  {
564  if( ToBeDestroyed == (*ProxIt) ) {
565  WorldObject* Parent = (*ProxIt)->GetParentObject();
566  if( Parent )
567  Parent->_NotifyProxyDestroyed( (*ProxIt) );
568 
569  this->ProxyIDGen.ReleaseID( ToBeDestroyed->GetProxyID() );
570  delete (*ProxIt);
571  this->Proxies.erase(ProxIt);
572  return;
573  }
574  }
575  }
576 
578  {
579  for( ProxyIterator ProxIt = this->Proxies.begin() ; ProxIt != this->Proxies.end() ; ++ProxIt )
580  {
581  WorldObject* Parent = (*ProxIt)->GetParentObject();
582  if( Parent )
583  Parent->_NotifyProxyDestroyed( (*ProxIt) );
584 
585  this->ProxyIDGen.ReleaseID( (*ProxIt)->GetProxyID() );
586  delete (*ProxIt);
587  }
588  this->Proxies.clear();
589  }
590 
592  { return this->Proxies.begin(); }
593 
595  { return this->Proxies.end(); }
596 
598  { return this->Proxies.begin(); }
599 
601  { return this->Proxies.end(); }
602 
603  ///////////////////////////////////////////////////////////////////////////////
604  // Light Management
605 
606  void SceneManager::SetAmbientLight(Real Red, Real Green, Real Blue, Real Alpha)
607  {
608  this->SMD->OgreManager->setAmbientLight(Ogre::ColourValue(Red, Green, Blue, Alpha));
609  }
610 
612  {
613  this->SMD->OgreManager->setAmbientLight(LightColor.GetOgreColourValue());
614  }
615 
617  {
618 
619  return ColourValue(this->SMD->OgreManager->getAmbientLight());
620  }
621 
622  ///////////////////////////////////////////////////////////////////////////////
623  // Utility
624 
626  { return this->SMD->OgreManager->getName(); }
627 
629  {
630  for( SceneManager::ProxyIterator it = Proxies.begin() ; it != Proxies.end() ; it++ )
631  if( (*it)->GetProxyType() == Mezzanine::PT_Graphics_ParticleSystemProxy )
632  static_cast<ParticleSystemProxy*>( (*it) )->PauseParticleSystem(Pause);
633  }
634 
636  {
637  // Do nothing for now
638  }
639 
641  {
642  if( !this->Initialized ) {
643  // Manager Initializations
645 
646  this->Initialized = true;
647  }
648  }
649 
651  {
652  if( this->Initialized ) {
653  this->DestroyAllProxies();
654  this->Initialized = false;
655  }
656  }
657 
658  ///////////////////////////////////////////////////////////////////////////////
659  // Type Identifier Methods
660 
662  { return SceneManager::InterfaceType; }
663 
666 
667  ///////////////////////////////////////////////////////////////////////////////
668  // Internal/Other
669 
670  Ogre::SceneManager* SceneManager::_GetGraphicsWorldPointer() const
671  { return (this->SMD && this->SMD->OgreManager) ? this->SMD->OgreManager : NULL; }
672 
674  { return this->SMD; }
675 
676  ///////////////////////////////////////////////////////////////////////////////
677  // DefaultSceneManagerFactory Methods
678 
680  { }
681 
683  { }
684 
687 
689  { return SceneManager::InterfaceType; }
690 
692  {
693  if( Params.empty() ) {
694  return new SceneManager(Creator);
695  }
696  String InternalManagerTypeName;
697  for( NameValuePairList::const_iterator ParIt = Params.begin() ; ParIt != Params.end() ; ++ParIt )
698  {
699  String Lower = (*ParIt).first;
701  if( "internalmanagertypename" == Lower ) {
702  InternalManagerTypeName = (*ParIt).second;
703  }
704  }
705  return new SceneManager(Creator,InternalManagerTypeName);
706  }
707 
709  {
710  return new SceneManager(Creator,XMLNode);
711  }
712 
714  {
715  delete ToBeDestroyed;
716  }
717  }//Graphics
718 }//Mezzanine
719 
720 ///////////////////////////////////////////////////////////////////////////////
721 // Class External << Operators for streaming or assignment
722 std::ostream& operator << (std::ostream& stream, const Mezzanine::Graphics::SceneManager& Ev)
723 {
724  stream << "<SceneManager Version=\"1\" Name=\"" << Ev.GetName()
725  //<< "\" Type=\"" << Ev.GetType()
726  << "\" SceneShadowTechnique=\"" << Ev.GetSceneShadowTechnique()
727  << "\" ShadowTextureCount=\"" << Ev.GetShadowTextureCount()
728  << "\" ShadowTextureSize=\"" << Ev.GetShadowTextureSize()
729  << "\" ShadowFarDistance=\"" << Ev.GetShadowFarDistance()
730  << "\" SkyMethod=\"" << Ev.WhichSky()
731  << "\">"
732  << "<ShadowColour>" << Ev.GetShadowColour() << "</ShadowColour>"
733  << "<AmbientLight>" << Ev.GetAmbientLight() << "</AmbientLight>";
734 
736  switch (Ev.WhichSky())
737  {
739  // Nothing to do
740  break;
742  Ogre::SceneManager::SkyPlaneGenParameters Values=SMD->OgreManager->getSkyPlaneGenParameters();
743  stream << "<SkyPlane Version=\"1"
744  << "\" MaterialName=\"" << SMD->SkyMaterialName
745  << "\" MaterialGroupName=\"" << SMD->SkyMaterialGroupName
746  << "\" DrawFirst=\"" << SMD->SkyDrawnFirst
747  << "\" Scale=\"" << Values.skyPlaneScale
748  << "\" Tiling=\"" << Values.skyPlaneTiling
749  << "\" Bow=\"" << Values.skyPlaneBow
750  << "\" XSegments=\"" << Values.skyPlaneXSegments
751  << "\" YSegments=\"" << Values.skyPlaneYSegments
752  << "\" >"
753  << SMD->SkyThePlane
754  << "</SkyPlane>";
755  // const Plane& SkyPlane_, const String& Material, const String& Group, Real Scale, Real Tiling, Boole DrawFirst, Real Bow, int XSegments, int YSegments
756  }
757  break;
759  Ogre::SceneManager::SkyBoxGenParameters Values = SMD->OgreManager->getSkyBoxGenParameters();
760  stream << "<SkyBox Version=\"1"
761  << "\" MaterialName=\"" << SMD->SkyMaterialName
762  << "\" MaterialGroupName=\"" << SMD->SkyMaterialGroupName
763  << "\" DrawFirst=\"" << SMD->SkyDrawnFirst
764  << "\" Distance=\"" << Values.skyBoxDistance
765  << "\" >"
766  << "<Orientation>" << SMD->SkyOrientation << "</Orientation>"
767  << "</SkyBox>";
768  // const String& Material, const String& Group, Real Distance, Boole DrawFirst=true, Quaternion Orientation=Quaternion()
769  }
770  break;
772  Ogre::SceneManager::SkyDomeGenParameters Values=SMD->OgreManager->getSkyDomeGenParameters();
773  stream << "<SkyDome Version=\"1"
774  << "\" MaterialName=\"" << SMD->SkyMaterialName
775  << "\" MaterialGroupName=\"" << SMD->SkyMaterialGroupName
776  << "\" DrawFirst=\"" << SMD->SkyDrawnFirst
777  << "\" Distance=\"" << Values.skyDomeDistance
778  << "\" Curvature=\"" << Values.skyDomeCurvature
779  << "\" Tiling=\"" << Values.skyDomeTiling
780  << "\" XSegments=\"" << Values.skyDomeXSegments
781  << "\" YSegments=\"" << Values.skyDomeYSegments
782  << "\" YSegments_keep=\"" << Values.skyDomeYSegments_keep
783  << "\" >"
784  << "<Orientation>" << SMD->SkyOrientation << "</Orientation>"
785  << "</SkyDome>";
786  // const String& Material, const String& Group, Real Distance, Real Curvature=10.0, Real Tiling=8.0, Boole DrawFirst=true, Quaternion Orientation=Quaternion(), int XSegments=16, int YSegments=16
787  }
788  break;
789  }
790  /* Sky Cache Member - String SkyMaterialName; Quaternion SkyOrientation; String SkyMaterialGroupName; Boole SkyDrawnFirst; Plane SkyThePlane; */
791  stream << "</SceneManager>";
792 
793 
794 // --name
795 // --shadow type
796 // --shadow Texture count
797 // --shadpw texture size
798 // --shadow distance
799 // --shadow colour
800 // --Sky
801 // -- Disable
802 // -- Plane& SkyPlane, String& Material, String& Group, Real Scale=1000.0, Real Tiling=10.0, Boole DrawFirst=true, Real Bow=0, int XSegments=1, int YSegments=1
803 // -- SkyBox(String& Material, String& Group, Real Distance, Boole DrawFirst=true, Quaternion Orientation=Quaternion());
804 // -- SkyDome(String& Material, String& Group, Real Distance, Real Curvature=10.0, Real Tiling=8.0, Boole DrawFirst=true, Quaternion Orientation=Quaternion(), int XSegments=16, int YSegments=16);
805 // -- Ambient light
806 // -- iterate over
807 // -- lights
808 // -- particles
809 // -- Worldnodes
810 
811  return stream;
812 }
813 
814 std::istream& MEZZ_LIB operator >> (std::istream& stream, Mezzanine::Graphics::SceneManager& Ev)
815 {
818 
819  Doc->GetFirstChild() >> Ev;
820 
821  return stream;
822 }
823 
825 {
826  if ( Mezzanine::String(OneNode.Name())==Mezzanine::String("SceneManager") )
827  {
828  if(OneNode.GetAttribute("Version").AsInt() == 1)
829  {
830  //Ev.SetType(static_cast<Mezzanine::SceneManager::SceneManagerType>(OneNode.GetAttribute("Type").AsInt()));
832  Ev.SetShadowTextureCount(OneNode.GetAttribute("ShadowTextureCount").AsInt());
833  Ev.SetShadowTextureSize(OneNode.GetAttribute("ShadowTextureSize").AsInt());
834  Ev.SetShadowFarDistance(OneNode.GetAttribute("ShadowFarDistance").AsReal());
836 
837  for(Mezzanine::XML::Node Child = OneNode.GetFirstChild(); Child!=0; Child = Child.GetNextSibling())
838  {
839  Mezzanine::String Name(Child.Name());
840  switch(Name[0])
841  {
842  case 'A': // AmbientLight
843  if(Name==Mezzanine::String("AmbientLight"))
844  {
845  if(Mezzanine::String(Child.GetFirstChild().Name()) == "ColourValue")
846  {
847  Mezzanine::ColourValue AllAroundUs;
848  Child.GetFirstChild() >> AllAroundUs;
849  Ev.SetAmbientLight(AllAroundUs);
850  }else{
851  MEZZ_EXCEPTION(Mezzanine::ExceptionBase::INVALID_VERSION_EXCEPTION,"Incompatible XML for SceneManager: Includes unknown Element AmbientLight-\"" + Name + "\".");
852  }
853  }else{
854  MEZZ_EXCEPTION(Mezzanine::ExceptionBase::INVALID_VERSION_EXCEPTION,"Incompatible XML for SceneManager: Includes unknown Element Sd-\"" + Name + "\".");
855  }
856  break;
857  case 'S': // Sky of some kind or "ShadowColor"
858  switch(Name[3])
859  {
860  case 'd': // ShadowColour
861  if(Name==Mezzanine::String("ShadowColour"))
862  {
863  if(Child.GetFirstChild())
864  {
865  if(Mezzanine::String(Child.GetFirstChild().Name()) == "ColourValue")
866  {
867  Mezzanine::ColourValue InTheShade;
868  Child.GetFirstChild() >> InTheShade;
869  Ev.SetShadowColour(InTheShade);
870  }else{
871  MEZZ_EXCEPTION(Mezzanine::ExceptionBase::INVALID_VERSION_EXCEPTION,"Incompatible XML for SceneManager: Includes unknown Element ShadowColour-\"" + Mezzanine::String(Child.GetFirstChild().Name()) + "\".");
872  }
873  }else{
874  MEZZ_EXCEPTION(Mezzanine::ExceptionBase::INVALID_VERSION_EXCEPTION,"Incompatible XML for SceneManager: ShadowColour has no child");
875  }
876  }else{
877  MEZZ_EXCEPTION(Mezzanine::ExceptionBase::INVALID_VERSION_EXCEPTION,"Incompatible XML for SceneManager: Includes unknown Element Sd-\"" + Name + "\".");
878  }
879  break;
880  case 'B': // SkyBox
881  if(Name==Mezzanine::String("SkyBox"))
882  {
883  if(Child.GetAttribute("Version").AsInt() == 1)
884  {
885  Mezzanine::Quaternion Orientation;
886  if(Mezzanine::String(Child.GetFirstChild().Name()) == "Orientation")
887  {
888  Child.GetFirstChild().GetFirstChild() >> Orientation;
889  }else{
890  MEZZ_EXCEPTION(Mezzanine::ExceptionBase::INVALID_VERSION_EXCEPTION,"Incompatible XML for SceneManager: Includes unknown Element Orientation-\"" + Name + "\".");
891  }
892  Ev.CreateSkyBox( Child.GetAttribute("MaterialName").AsString(),
893  Child.GetAttribute("MaterialGroupName").AsString(),
894  Child.GetAttribute("Distance").AsReal(),
895  Child.GetAttribute("DrawFirst").AsBool(),
896  Orientation);
897  }else{
898  MEZZ_EXCEPTION(Mezzanine::ExceptionBase::INVALID_VERSION_EXCEPTION,"Incompatible XML for SkyBox: Not Version 1.");
899  }
900  }else{
901  MEZZ_EXCEPTION(Mezzanine::ExceptionBase::INVALID_VERSION_EXCEPTION,"Incompatible XML for SceneManager: Includes unknown Element SB-\"" + Name + "\".");
902  }
903  break;
904  case 'D': // SkyDome
905  if(Name==Mezzanine::String("SkyDome"))
906  {
907  if(Child.GetAttribute("Version").AsInt() == 1)
908  {
909  Mezzanine::Quaternion Orientation;
910  if(Mezzanine::String(Child.GetFirstChild().Name()) == "Orientation")
911  {
912  Child.GetFirstChild().GetFirstChild() >> Orientation;
913  }else{
914  MEZZ_EXCEPTION(Mezzanine::ExceptionBase::INVALID_VERSION_EXCEPTION,"Incompatible XML for SceneManager: Includes unknown Element Orientation-\"" + Name + "\".");
915  }
916  Ev.CreateSkyDome( Child.GetAttribute("MaterialName").AsString(),
917  Child.GetAttribute("MaterialGroupName").AsString(),
918  Child.GetAttribute("Distance").AsReal(),
919  Child.GetAttribute("Curvature").AsReal(),
920  Child.GetAttribute("Tiling").AsReal(),
921  Child.GetAttribute("DrawFirst").AsBool(),
922  Orientation,
923  Child.GetAttribute("XSegments").AsInt(),
924  Child.GetAttribute("YSegments").AsInt());
925 
926  }else{
927  MEZZ_EXCEPTION(Mezzanine::ExceptionBase::INVALID_VERSION_EXCEPTION,"Incompatible XML for SkyDome: Not Version 1.");
928  }
929  }else{
930  MEZZ_EXCEPTION(Mezzanine::ExceptionBase::INVALID_VERSION_EXCEPTION,"Incompatible XML for SceneManager: Includes unknown Element SD-\"" + Name + "\".");
931  }
932  break;
933  case 'P': // SkyPlane
934  if(Name==Mezzanine::String("SkyPlane"))
935  {
936  Mezzanine::Plane SkyOrientation;
937  Child.GetFirstChild() >> SkyOrientation;
938 
939  if(Child.GetAttribute("Version").AsInt() == 1)
940  {
941  Ev.CreateSkyPlane( SkyOrientation,
942  Child.GetAttribute("MaterialName").AsString(),
943  Child.GetAttribute("MaterialGroupName").AsString(),
944  Child.GetAttribute("Scale").AsReal(),
945  Child.GetAttribute("Tiling").AsReal(),
946  Child.GetAttribute("DrawFirst").AsBool(),
947  Child.GetAttribute("Bow").AsBool(),
948  Child.GetAttribute("XSegments").AsInt(),
949  Child.GetAttribute("YSegments").AsInt());
950  }else{
951  MEZZ_EXCEPTION(Mezzanine::ExceptionBase::INVALID_VERSION_EXCEPTION,"Incompatible XML for SkyPlane: Not Version 1.");
952  }
953  }else{
954  MEZZ_EXCEPTION(Mezzanine::ExceptionBase::INVALID_VERSION_EXCEPTION,"Incompatible XML for SceneManager: Includes unknown Element SP-\"" + Name + "\".");
955  }
956  break;
957  }
958  break;
959  default:
960  { MEZZ_EXCEPTION(Mezzanine::ExceptionBase::INVALID_VERSION_EXCEPTION,"Incompatible XML for SceneManager: Includes unknown Element def-\"" + Name + "\"."); }
961  }
962  }
963  }else{
964  MEZZ_EXCEPTION(Mezzanine::ExceptionBase::INVALID_VERSION_EXCEPTION,"Incompatible XML Version for SceneManager: Not Version 1.");
965  }
966  }else{
967  MEZZ_EXCEPTION(Mezzanine::ExceptionBase::II_IDENTITY_INVALID_EXCEPTION,"Attempting to deserialize a SceneManager, found a " + Mezzanine::String(OneNode.Name()));
968  }
969 }
970 
971 
972 
973 #endif
String GetOneTag(std::istream &stream)
Gets the first tag out of the Stream and returns it as a String.
Definition: xmlstring.cpp:72
std::ostream & operator<<(std::ostream &stream, const Mezzanine::LinearInterpolator< T > &Lint)
Used to Serialize an Mezzanine::LinearInterpolator to a human readable stream.
Definition: interpolator.h:433
virtual String GetImplementationTypeName() const
This Allows any manager name to be sent to a stream. Primarily used for logging.
LightType
This is used by LightProxies to describe how light is emitted from the proxy source.
A light-weight handle for manipulating attributes in DOM tree.
Definition: attribute.h:74
UInt32 GetNumProxies() const
Gets the number of RenderableProxy instances in this manager.
SceneShadowTechnique
needs to be documented
Definition: scenemanager.h:101
SceneManagerData * SMD
Pointer to a class storing sensative internal data for the scene.
Definition: scenemanager.h:131
BillboardSetProxy * CreateBillboardSetProxy(const Boole AddToWorld)
Creates a new BillboardSetProxy with a pool size of 20.
SceneManagerData * _GetRawInternalDataPointer() const
Gets the raw internal internal data.
bool Boole
Generally acts a single bit, true or false.
Definition: datatypes.h:173
This class contains utilities and functions to allow the manipulation of the Graphical scene...
Definition: scenemanager.h:85
ColourValue ConvertToColourValue(const String &ToConvert)
Convert four numbers in a string into a ColourValue.
Definition: stringtool.cpp:332
virtual ~DefaultSceneManagerFactory()
Class destructor.
ManagerType
A listing of Manager Types.
Definition: managerbase.h:65
Plane SkyThePlane
Used to describe a skyplane instead of orientation.
Quaternion SkyOrientation
The orientation of the sky, unless it's a Skyplane, this this is all 0s.
SceneManagerData(SceneManager *_SM)
Create One of these, the data every scenemanager needs.
EntityProxy * CreateEntityProxy(const Boole AddToWorld)
Creates a new EntityProxy.
virtual UInt32 GetProxyID() const
Gets the unique ID of this proxy.
Definition: worldproxy.cpp:78
Document * PreParseClassFromSingleTag(const String &NameSpace, const String &ClassName, const String &OneTag)
Perform a basic series of checks for extracting meaning from a single xml tag.
Definition: xmlstring.cpp:116
unsigned short ShadowTextureSize
The size.
LightProxy * CreateLightProxy(const Boole AddToWorld)
Creates a new LightProxy.
Node GetFirstChild() const
Get the first child Node of this Node.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
Definition: exception.h:3048
This class is used to check and modify the properties of a graphics mesh.
Definition: mesh.h:63
virtual void AddToWorld()
Performs all the necessary task to ensure this object is connected to it's respective world and ready...
void DisableSky()
If any sky is active, disable it.
A simple reference counting pointer.
Definition: countedptr.h:70
CameraProxy * CreateCamera()
Creates a new camera.
String GetManagerImplName() const
Gets the name of the manager that is created by this factory.
Thrown when a version is accessed/parsed/required and it cannot work correctly or is missing...
Definition: exception.h:112
void DisableSky(SceneManager *ScenePTR)
Disable the sky ina given scenemanager.
void DisableSkyPlane()
Disables the currently active skyplane.
void SetShadowTextureSize(unsigned short Size)
Sets the size of all texture based shadows.
const Char8 * AsString(const Char8 *def="") const
Attempts to convert the value of the attribute to a String and returns the results.
Ogre::Plane GetOgrePlane() const
Gets an Ogre::Plane that contains this Planes information.
Definition: plane.cpp:190
void SetShadowFarDistance(const Real &FarDist)
Sets the maximum distance from the camera that shadows will be visible.
IDType GenerateID()
Generates a new ID unique to the pool made by this generator.
A flat plane use to draw the sky.
Definition: scenemanager.h:116
void PauseAllParticles(Boole Pause)
Pauses(or unpauses) all particles stored in this manager.
void SetShadowColour(const ColourValue &ShadowColour)
Sets the colour to be used when casting shadows.
UIDGenerator ProxyIDGen
Generator responsible for creating unique IDs for CollidableProxy instances.
Definition: scenemanager.h:125
This is the base proxy class for world proxies wrapping functionality of the graphics subsystem...
SceneShadowTechnique GetSceneShadowTechnique() const
Gets the currently set shadow technique.
This is the proxy class for placing and manipulating a mesh in the scene.
Definition: entityproxy.h:62
This file contains the declaration for the World proxy wrapping billboard functionality.
This file contains the declaration for the World proxy wrapping light functionality.
This is a simple class for holding 4 reals representing the colour any give object or lightsource can...
Definition: colourvalue.h:64
ManagerBase::ManagerType GetManagerType() const
Gets the type of manager that is created by this factory.
bool Empty() const
Is this storing anything at all?
static const ManagerBase::ManagerType InterfaceType
A ManagerType enum value used to describe the type of interface/functionality this manager provides...
Definition: scenemanager.h:98
This is used to represent a flat infinite slice of the game world.
Definition: plane.h:65
This implements the exception hiearchy for Mezzanine.
Node GetNextSibling() const
Attempt to retrieve the next sibling of this Node.
virtual void Pause(const UInt32 PL)
Sets the pause state of this manager, or has no effect depending on the value passed in...
void ToLowerCase(String &Source)
Converts all upper case characters in a string to their respective lower case.
Definition: stringtool.cpp:193
SceneManager::SkyMethod ActiveSky
The currently active sky, if set to anything other than SkyNone, then the 5 other skycache variable m...
WorldManager * CreateManager(World *Creator, const NameValuePairList &Params)
Creates a manager of the type represented by this factory.
This is the proxy class for placing and manipulating a set of 2D billboards in the scene...
SceneManager(World *Creator, const String &InternalManagerTypeName="DefaultSceneManager")
Class Constructor.
float Real
A Datatype used to represent a real floating point number.
Definition: datatypes.h:141
ProxyContainer Proxies
Container storing all of the RenderableProxy instances created by this manager.
Definition: scenemanager.h:128
This is the base class from which classes that are insertable into the physical world.
Definition: worldobject.h:60
ParticleSystemProxy * CreateParticleSystemProxy(const String &Template, const Boole AddToWorld)
Creates a new ParticleSystemProxy.
void CreateSkyDome(const String &Material, const String &Group, Real Distance, Real Curvature=10.0, Real Tiling=8.0, Boole DrawFirst=true, Quaternion Orientation=Quaternion(), int XSegments=16, int YSegments=16)
Creates a skydome for use in making a sky.
void SetAmbientLight(Real Red=1.0, Real Green=1.0, Real Blue=1.0, Real Alpha=1.0)
Sets the ambient light for the scene.
virtual ~SceneManager()
Class destructor.
Whole AsWhole(Whole def=0) const
Attempts to convert the value of the attribute to a Whole and returns the results.
ColourValue GetShadowColour() const
Gets the colour being used when casting shadows.
Ogre::Quaternion GetOgreQuaternion(Boole normalize=false) const
Gets a Ogre quaternion.
Definition: quaternion.cpp:263
static const String ImplementationName
A String containing the name of this manager implementation.
Definition: scenemanager.h:96
A box using 5 Rectangles to draw the sky.
Definition: scenemanager.h:117
This file contains the declaration for the World proxy wrapping camera functionality.
Boole ReserveID(const IDType ID)
Adds a specific ID to the pool of used IDs.
A light-weight handle for manipulating nodes in DOM tree.
Definition: node.h:89
Stencil shadow technique which renders all shadow volumes as a modulation after all the non-transpare...
Definition: scenemanager.h:104
const String ConstString
A Datatype used to a series of imutable characters.
Definition: datatypes.h:165
int AsInt(int def=0) const
Attempts to convert the value of the attribute to an int and returns the results. ...
ProxyType
Used by all World proxies to describe what their derived types are.
Definition: enumerations.h:91
uint32_t UInt32
An 32-bit unsigned integer.
Definition: datatypes.h:126
Stores internal data for the SCeneManager to keep it from cluttering the Header file.
This file contains the declaration for the World proxy wrapping basic entity(mesh) functionality...
bool Empty() const
Is this storing anything at all?
unsigned short GetShadowTextureSize() const
Retrieve the size of textures.
virtual void Initialize()
Configures this manager for use prior to entering the main loop.
Texture-based shadow technique which involves a render-to-texture of the shadow caster and a projecti...
Definition: scenemanager.h:109
Real AsReal(Real def=0) const
Attempts to convert the value of the attribute to a Real and returns the results. ...
String SkyMaterialName
The Name of the Material the sky is made of.
Boole SkyDrawnFirst
When is the sky drawn, first or per Z-order.
void DestroyAllProxies()
Deletes all stored RenderableProxy instances.
std::list< NameValuePair > NameValuePairList
This is a datatype mostly used for describing settings or parameters that can't be declared in advanc...
Definition: datatypes.h:206
Texture-based shadow technique which involves a render-to-texture of the shadow caster and a projecti...
Definition: scenemanager.h:107
ProxyIterator EndRenderableProxy()
Gets an iterator to one passed the last Renderable Proxy in this manager.
This is the base class for all managers that belong to a single world instance.
Definition: worldmanager.h:55
virtual void Initialize()
Configures this manager for use prior to entering the main loop.
This is the proxy class for placing and manipulating a camera in the scene.
Definition: cameraproxy.h:65
Real GetShadowFarDistance() const
Gets the maximum distance from the camera that shadows will be visible.
Texture-based shadow technique which involves a render-to-texture of the shadow caster and a projecti...
Definition: scenemanager.h:108
This is the proxy class for placing and manipulating particles in the scene.
virtual ManagerType GetInterfaceType() const
This returns the type of this manager.
Thrown when the identity string wasn't valid at all.
Definition: exception.h:93
Ogre::SceneManager * _GetGraphicsWorldPointer() const
Gets the internal Ogre Scene Manager pointer.
This is used to represent a point in space, or a vector through space.
Definition: vector3.h:77
String SkyMaterialGroupName
The name of the group the sky material is in.
Ogre::SceneManager * OgreManager
Pointer for the Ogre Scenemanager, where this manager gets it's functionality.
#define MEZZ_LIB
Some platforms require special decorations to denote what is exported/imported in a share library...
Stencil shadow technique which renders each light as a separate additive pass to the scene...
Definition: scenemanager.h:105
The bulk of the engine components go in this namspace.
Definition: actor.cpp:56
This is the proxy class for placing and manipulating lighting in the scene.
Definition: lightproxy.h:63
unsigned long Whole
Whole is an unsigned integer, it will be at least 32bits in size.
Definition: datatypes.h:151
SkyMethod WhichSky() const
get the kind of sy in use
std::istream & operator>>(std::istream &stream, Mezzanine::LinearInterpolator< T > &Lint)
Used to de-serialize an Mezzanine::LinearInterpolator from a stream.
Definition: interpolator.h:448
This file contains the declaration for the World proxy wrapping particle functionality.
RenderableProxy * GetProxy(const UInt32 Index) const
Gets a RenderableProxy instance by index.
void DestroyProxy(RenderableProxy *ToBeDestroyed)
Deletes a RenderableProxy.
This class represents a world for objects to interact within.
Definition: world.h:74
void UpdateSkyCache(SceneManager::SkyMethod FreshSkyMethod=SceneManager::SkyNone, String FreshSkyMaterialName="", Quaternion FreshSkyOrientation=Quaternion(0, 0, 0, 0), String FreshSkyMaterialGroupName="", Boole FreshSkyDrawnFirst=false, Plane FreshSkyThePlane=Plane(Vector3(0, 0, 0), 0))
update the information that is cached about the sky
Boole ReleaseID(const IDType ID)
Frees up an ID so that it can be reused.
void SetSceneShadowTechnique(SceneShadowTechnique Shadows)
Sets the type of shadows to be used when rendering the scene.
void CreateSkyPlane(const Plane &SkyPlane_, const String &Material, const String &Group, Real Scale=1000.0, Real Tiling=10.0, Boole DrawFirst=true, Real Bow=0, int XSegments=1, int YSegments=1)
Creates a skyplane for use in making a sky.
virtual void AddToWorld()
Performs all the necessary task to ensure this object is connected to it's respective world and ready...
A multifaceted hemispherical dome, the most sophisticated sky background.
Definition: scenemanager.h:118
virtual void Deinitialize()
Removes this manager from any necessary configuration so it can be safely disposed of...
Whole GetShadowTextureCount() const
Gets the currently set number of textures being used to make texture shadows.
const Char8 * Name() const
ptrdiff_tGet the name of this Node.
This is used to store information about rotation in 3d space.
Definition: quaternion.h:68
Ogre::ColourValue GetOgreColourValue() const
Creates and returns an Ogre ColourValue class with values equal to this one.
Definition: colourvalue.cpp:86
void DisableSkyDome()
Disables the currently active skydome.
SkyMethod
Used to help identify which method is used to draw the sky, if any.
Definition: scenemanager.h:113
ProxyContainer::iterator ProxyIterator
Iterator type for RenderableProxy instances stored by this class.
Definition: scenemanager.h:91
ProxyContainer::const_iterator ConstProxyIterator
Const Iterator type for RenderableProxy instances stored by this class.
Definition: scenemanager.h:93
void DisableSkyBox()
Disables the currently active skybox.
void SetShadowTextureCount(const Whole &Count)
Sets the number of textures to be alloted for creating shadows.
ProxyIterator BeginRenderableProxy()
Gets an iterator to the first Renderable Proxy in this manager.
This class represents all the rendering passes a rendered object has.
Definition: material.h:65
ConstString & GetName() const
Gets the name of this manager.
SceneManager * SM
A Pointer to the scenemanager this works with.
std::string String
A datatype used to a series of characters.
Definition: datatypes.h:159
void DestroyManager(WorldManager *ToBeDestroyed)
Destroys a Manager created by this factory.
Texture-based shadow technique which involves a monochrome render-to-texture of the shadow caster and...
Definition: scenemanager.h:106
Attribute GetAttribute(const Char8 *Name) const
Attempt to get an Attribute on this Node with a given name.
virtual void _NotifyProxyDestroyed(WorldProxy *ToBeDestroyed)=0
Notifies that a proxy belonging to this WorldObject is being forcibly destroyed, and it needs to upda...
void CreateSkyBox(const String &Material, const String &Group, Real Distance, Boole DrawFirst=true, Quaternion Orientation=Quaternion())
Creates a skybox for use in making a sky.
Node GetChild(const Char8 *Name) const
Attempt to get a child Node with a given name.
ColourValue GetAmbientLight() const
Retrieve the level of the ambient light.
Boole Initialized
Simple Boole indicating whether or not this manager has been initialized.
Definition: managerbase.h:111