My Project
LightManager.h
1 #pragma once
2 #include <vector>
3 #include "LightParam.h"
4 
5 namespace ParaEngine
6 {
7  using namespace std;
8  typedef vector<CLightParam*> LightList;
9 
13  {
14  public:
15  CLightManager(void);
16  ~CLightManager(void);
17 
18  static CLightManager& GetSingleton();
19  public:
21  void CleanupLights();
22 
24  bool RegisterLight(CLightParam* pLight);
26  bool UnRegisterLight(CLightParam* pLight);
27 
35  int GetBestLights(const Vector3& vCenter , float fRadius, LightList & listOutLights, int nMaxNumLights = 0xffffffff);
37  int GetBestLights(const Vector3& vCenter , float fRadius, int nMaxNumLights = 0xffffffff);
40  LightList* GetLastResult();
43  int GetLastResultNum();
44 
46  int GetNumLights() const;
48  LightList& GetLights();
49 
57  int ComputeLightScore(CLightParam* pLight, const Vector3& vCenter, float fRadius) const;
58 
59  private:
64  int FillLightList(LightList & listOutLights, int nMaxNumLights = 0xffffffff);
65 
66  // light pool
67  LightList m_lights;
68  // light result
69  LightList m_lightsRes;
70  int m_lightsResNum;
71  };
72 }
managing local lights.
Definition: LightManager.h:12
different physics engine has different winding order.
Definition: EventBinding.h:32
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
a single light in ParaEngine.
Definition: LightParam.h:6