AnimatLab  2
Test
LightManager.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 namespace AnimatSim
10 {
11  namespace Environment
12  {
23  class ANIMAT_PORT LightManager : public AnimatBase
24  {
25  protected:
27  CStdPtrArray<Light> m_aryLights;
28 
31 
32  Light *LoadLight(CStdXml &oXml);
33 
34  virtual void SetupLights();
35  virtual void AddLight(std::string strXml);
36  virtual void RemoveLight(std::string strID, bool bThrowError = true);
37 
38  public:
39  LightManager(void);
40  virtual ~LightManager(void);
41 
42  static LightManager *CastToDerived(AnimatBase *lpBase) {return static_cast<LightManager*>(lpBase);}
43 
44 #pragma region AccessorMutators
45 
54  virtual CStdPtrArray<Light> *Lights() {return &m_aryLights;};
55 
56 #pragma endregion
57 
58 #pragma region DataAccesMethods
59 
60  virtual bool AddItem(const std::string &strItemType, const std::string &strXml, bool bThrowError = true, bool bDoNotInit = false);
61  virtual bool RemoveItem(const std::string &strItemType, const std::string &strID, bool bThrowError = true);
62  virtual int FindChildListPos(std::string strID, bool bThrowError = true);
63 
64 #pragma endregion
65 
66  virtual void Initialize();
67  virtual void Load(CStdXml &oXml);
68  };
69 
70  } // Environment
71 } //AnimatSim
Root namespace for the base simulation library for AnimatLab.
Base class for the light object.
Definition: Light.h:23
CStdPtrArray< Light > m_aryLights
Array of Light objects.
Definition: LightManager.h:27
virtual CStdPtrArray< Light > * Lights()
Gets the lights array.
Definition: LightManager.h:54
Animat base class.
Definition: AnimatBase.h:36
int m_iMaxLights
The maximum number of lights that can be added to the scene.
Definition: LightManager.h:30