Kochol Game Engine  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
xpsm.h
Go to the documentation of this file.
1 #ifndef KGE_XPSM_H
2 #define KGE_XPSM_H
3 
4 #include "ShadowMapProjection.h"
5 
6 namespace kge
7 {
8  namespace efx
9  {
11  {
12  public:
14  XPSM(int ShadowMapSize, sn::SceneManager* pSmgr);
15 
17  ~XPSM();
18 
20  virtual bool Init();
21 
23  void PreRender(float elapsedTime = 0.0f);
24 
26  void Render();
27 
29  void PostRenderEverything();
30 
31  //various bias values
32  float m_XPSM_Coef;
33  float m_XPSM_Bias;
34  float m_XPSM_ZBias;
36 
37  protected:
38 
39  float m_fAspect, m_zNear, m_zFar, m_ppNear, m_ppFar, m_fSlideBack, m_fLSPSM_Nopt, m_fCosGamma;
40 
42 
44  void BuildXPSMProjectionMatrix();
45 
46  void TransformWithWClip(
47  const std::vector<gfx::Vertex3>& inVectors,
48  std::vector<gfx::Vertex3>& outVectors,
49  const math::Matrix& transform,
50  float wThreshold);
51 
52  bool IntersectAABB2D(
53  math::AABB& c,
54  const math::AABB& a,
55  const math::AABB& b);
56 
57 
58  }; // XPSM
59 
60  } // efx
61 
62 } // kge
63 
64 #endif // KGE_XPSM_H