raSystem  1.0 bata
raRender.h
Go to the documentation of this file.
1 #pragma once
2 
3  class RAPI raRender
4  {
5  friend bool operator == (const raRender& a, const raRender& b);
6  public:
7  raRender(raSmartPointer<raDirectX> dx, const raMatrix* mWorld = NULL, LPCSTR Name = "Render");
8 
9  virtual ~raRender(void) {};
10 
11  virtual bool Create() { return false; }
12  virtual void Destroy() { };
13 
14  virtual bool Render(UINT drawOrder, const raMatrix& pView, const raMatrix& pProj,
15  const raLight* pLight, LPCSTR techniqueName = "") {return true; }
16 
17  virtual bool Update(float fTime, float fRunTime){ return true; }
18 
19  LPCSTR GetName() { return m_Name; }
20  void SetName(LPCSTR Name) { m_Name = Name; }
21 
22  virtual void SetVisible (bool bVisible) { }
23  virtual void SetSelected(bool bSelected) {};
24  virtual void SetWorldMatrix(const raMatrix& value);
25  virtual raMatrix* GetWorldMatrix(void);
26 
27  virtual const float GetBoundingsphereRadius() { return 1.0f; }
28  virtual bool Intersects(const raVector3* pRayPos,
29  const raVector3* pRayDir,
30  float* pDist) { return false; };
31 
32  protected:
35  LPCSTR m_Name;
36  };
37  inline bool operator == (const raRender& a, const raRender& b) { return ((a.m_Name == b.m_Name) && (a.m_World == b.m_World)); }
LPCSTR GetName()
Definition: raRender.h:19
Definition: raLight.h:5
bool operator==(const raRender &a, const raRender &b)
Definition: raRender.h:37
virtual void Destroy()
Definition: raRender.h:12
#define RAPI
Definition: raMain.h:11
LPCSTR m_Name
Definition: raRender.h:35
virtual bool Intersects(const raVector3 *pRayPos, const raVector3 *pRayDir, float *pDist)
Definition: raRender.h:28
virtual const float GetBoundingsphereRadius()
Definition: raRender.h:27
raSmartPointer< raDirectX > m_dx
Definition: raRender.h:30
virtual bool Render(UINT drawOrder, const raMatrix &pView, const raMatrix &pProj, const raLight *pLight, LPCSTR techniqueName="")
Definition: raRender.h:14
virtual void SetVisible(bool bVisible)
Definition: raRender.h:22
virtual bool Update(float fTime, float fRunTime)
Definition: raRender.h:17
virtual ~raRender(void)
Definition: raRender.h:9
void SetName(LPCSTR Name)
Definition: raRender.h:20
virtual void SetSelected(bool bSelected)
Definition: raRender.h:23
raMatrix m_World
Definition: raRender.h:34
virtual bool Create()
Definition: raRender.h:11