Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

GXLandRenderer.h

Go to the documentation of this file.
00001 #ifndef __GXLANDRENDERER
00002 #define __GXLANDRENDERER
00003 
00004 #include "GXBitmapLand.h"
00005 #include "GXMiscD3DFunctions.h"
00006 #include "GXStandardDefines.h"
00007 
00008 //todo, exit the thread better
00009 class CGXLandRenderer
00010 {
00011 public:
00012         CGXLandRenderer();
00013         virtual ~CGXLandRenderer();
00014         virtual void Cleanup();
00015 
00016         virtual bool Init(CGXDeviceContainer* pDevice);
00017 
00018         virtual bool LoadFromFile(char* szFileName, UINT uSideSize);
00019 
00020         virtual bool SaveToFile(char* szFileName);
00021         
00022         virtual bool SetCameraParams(D3DXVECTOR3* pEye,
00023                                                                 D3DXMATRIX* pViewMatrix);
00024 
00025         virtual void SetProjMatrix(D3DXMATRIX* pIn);
00026 
00027         virtual bool Render();
00028 
00029         virtual bool Update();
00030 
00031         inline HANDLE GetThread()
00032         {
00033                 return m_hThreadHandle;
00034         }
00035 
00036 
00037         inline UINT GetSleepTime()
00038         {
00039                 return m_nSleepTime;
00040         }
00041 
00042         inline void SetSleepTime(UINT uTime)
00043         {
00044                 m_nSleepTime=uTime;
00045         }
00046 
00047 
00048         inline CGXBitmapLand* GetLand()
00049         {
00050                 return &m_Land;
00051         }
00052 
00053         inline bool ShouldThreadExit()
00054         {
00055                 return m_bThreadShouldExit;
00056         }
00057 
00058 protected:
00059 
00060         virtual bool InitThread();
00061         virtual bool KillThread();
00062 
00063         virtual bool InitShader();
00064         
00065 
00066 protected:
00067         CGXBitmapLand   m_Land;
00068 
00069         D3DXMATRIX              m_mProjectionMatrix;
00070         D3DXMATRIX              m_mViewMatrix;
00071         D3DXVECTOR3             m_vEyePos;
00072 
00073         HANDLE                  m_hThreadHandle;
00074         DWORD                   m_dwShader;
00075 
00076 
00077         CGXDeviceContainer* m_pDevice;
00078 
00079         UINT                    m_nSleepTime;
00080 
00081         HANDLE                  m_hThreadHasDiedEvent;
00082 
00083         bool                    m_bThreadShouldExit;
00084 };
00085 
00086 
00087 DWORD WINAPI GXUpdateLandThread(LPVOID lpParameter);
00088 
00089 
00090 
00091 
00092 #endif

Generated on Thu May 23 17:51:00 2002 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001