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

RainGraphics.h

Go to the documentation of this file.
00001 #ifndef __RAINGRAPHX
00002 #define __RAINGRAPHX
00003 
00004 
00005 
00006 #include "RainDefines.h"
00007 #include "RainCOMFactory.h"
00008 
00009 #include "..\..\Graphics\GXCOMDLL\GXCOMDLL.h"//for IGXRenderer
00010 
00011 
00012 class CRainGraphics
00013 {
00014 public:
00015         CRainGraphics();
00016         ~CRainGraphics();
00017 
00018         bool Init(CRainCOMFactory* pFactory,
00019                                 UINT uWindowWidth, UINT uWindowHeight, 
00020                                 bool bFullScreen, HWND hWnd);
00021 
00022         void ShutDown();
00023 
00024         inline void RotateCamera(const float fX, const float fY)
00025         {
00026                 assert(m_pGraphics);
00027                 m_pGraphics->RotateCamera(fX, fY);
00028         }
00029 
00030         inline void GetCameraVelocity(float* pOut)
00031         {
00032                 assert(m_pGraphics);
00033                 m_pGraphics->GetCameraVelocity(pOut);
00034         }
00035 
00036         inline void SetCameraVelocity(const float fVel)
00037         {
00038                 assert(m_pGraphics);
00039                 m_pGraphics->SetCameraVelocity(fVel);
00040         }
00041 
00042 
00043         inline bool LoadLand(BSTR szFileName)
00044         {
00045                 assert(m_pGraphics);
00046                 return SUCCEEDED(m_pGraphics->LoadLand(szFileName));
00047         }
00048 
00049         inline bool SaveLand(BSTR szFileName)
00050         {
00051                 assert(m_pGraphics);
00052                 return SUCCEEDED(m_pGraphics->SaveLand(szFileName));
00053         }
00054 
00055         inline bool GenerateLand(const UINT uRandSeed, BSTR szColorSpline)
00056         {
00057                 assert(m_pGraphics);
00058                 return SUCCEEDED(m_pGraphics->GenerateLand(uRandSeed, szColorSpline));
00059         }
00060 
00061         inline bool GetCameraPos(float* pOut)
00062         {
00063                 assert(m_pGraphics);
00064                 return SUCCEEDED(m_pGraphics->GetCameraPos(pOut));
00065         }
00066 
00067         inline bool SetCameraPos(float* pIn)
00068         {
00069                 assert(m_pGraphics);
00070                 return SUCCEEDED(m_pGraphics->SetCameraPos(pIn));
00071         }
00072 
00073         inline bool MoveCamera(GXMOVEDIR Direction, float fAmt)
00074         {
00075                 assert(m_pGraphics);
00076                 return SUCCEEDED(m_pGraphics->MoveCamera(Direction, fAmt));
00077         }
00078 
00079         inline bool ToggleWindowConfig(BOOL bFullScreen, UINT uWidth, UINT uHeight)
00080         {
00081                 assert(m_pGraphics);
00082                 return SUCCEEDED(m_pGraphics->ToggleWindowConfig(bFullScreen, uWidth, uHeight));
00083         }
00084 
00085         inline void GetTime(UINT* pOut)
00086         {
00087                 assert(m_pGraphics);
00088                 m_pGraphics->GetTime(pOut);
00089         }
00090 
00091         inline bool SetTime(UINT uNewTime)
00092         {
00093                 assert(m_pGraphics);
00094                 return SUCCEEDED(m_pGraphics->SetTime(uNewTime));
00095         }
00096 
00097         inline bool IncrementTime()
00098         {
00099                 assert(m_pGraphics);
00100                 return SUCCEEDED(m_pGraphics->IncrementTime());
00101         }
00102 
00103 
00104         inline bool PrecacheModel(BSTR szFileName, UINT* pIndexOut)
00105         {
00106                 assert(m_pGraphics);
00107                 return SUCCEEDED(m_pGraphics->PrecacheModel(szFileName, pIndexOut));
00108         }
00109 
00110         inline bool CreateEntity(UINT uModel, UINT* pIDOut)
00111         {
00112                 assert(m_pGraphics);
00113                 return SUCCEEDED(m_pGraphics->CreateEntity(uModel, pIDOut));
00114         }
00115 
00116         inline bool DeleteEntity(UINT uID)
00117         {
00118                 assert(m_pGraphics);
00119                 return SUCCEEDED(m_pGraphics->DeleteEntity(uID));
00120         }
00121 
00122         inline bool GetEntityWaypoint(UINT uID, SGXEntityWaypoints* pOut)
00123         {
00124                 assert(m_pGraphics);
00125                 return SUCCEEDED(m_pGraphics->GetEntityWaypoint(uID, pOut));
00126         }
00127 
00128         inline bool SetEntityWaypoint(UINT uID, SGXEntityWaypoints* pIn)
00129         {
00130                 assert(m_pGraphics);
00131                 return SUCCEEDED(m_pGraphics->SetEntityWaypoint(uID, pIn));
00132         }
00133 
00134 
00135         inline bool ValidateWindow()
00136         {
00137                 assert(m_pGraphics);
00138                 return SUCCEEDED(m_pGraphics->ValidateWindow());
00139         }
00140 
00141 
00142         inline void DisplayStats(BOOL bDisplay)
00143         {
00144                 assert(m_pGraphics);
00145                 m_pGraphics->DisplayStats(bDisplay);
00146         }
00147 
00148 
00149         inline bool PrecacheSprite(BSTR FileName, UINT* pOut)
00150         {
00151                 assert(m_pGraphics);
00152                 return SUCCEEDED(m_pGraphics->PrecacheSprite(FileName, pOut));
00153         }
00154 
00155         inline bool AddSpriteInstance(SGXSpriteInfo* pInfo)
00156         {
00157                 assert(m_pGraphics);
00158                 return SUCCEEDED(m_pGraphics->AddSpriteInstance(pInfo));
00159         }
00160 
00161 
00162         inline bool DeleteSpriteInstance(UINT uIndex)
00163         {
00164                 assert(m_pGraphics);
00165                 return SUCCEEDED(m_pGraphics->DeleteSpriteInstance(uIndex));
00166         }
00167 
00168         inline bool GetSpriteInfo(UINT uIndex, SGXSpriteInfo* pOut)
00169         {
00170                 assert(m_pGraphics);
00171                 return SUCCEEDED(m_pGraphics->GetSpriteInfo(uIndex, pOut));
00172         }
00173 
00174         inline bool SetSpriteInfo(UINT uIndex, SGXSpriteInfo* pIn)
00175         {
00176                 assert(m_pGraphics);
00177                 return SUCCEEDED(m_pGraphics->SetSpriteInfo(uIndex, pIn));
00178         }
00179 
00180         inline bool GetEntityPos(UINT uEntity, float* pOutPos)
00181         {
00182                 assert(m_pGraphics);
00183                 return SUCCEEDED(m_pGraphics->GetEntityPos(uEntity, pOutPos));
00184         }
00185 
00186         inline void GetCameraDirection(float* pOut)
00187         {
00188                 assert(m_pGraphics);
00189                 m_pGraphics->GetCameraDirection(pOut);
00190         }
00191         
00192 
00193 
00194 
00195 
00196 
00197 
00198 
00199 
00200 
00201 
00202 
00203 
00204 
00205 
00206 
00207 
00208 
00209 
00210 
00211 
00212 
00213 
00214 
00215 
00216 
00217 
00218 
00219 
00220 
00221 
00222 private:
00223         void Cleanup();
00224 private:
00225         IGXRenderer*            m_pGraphics;
00226 };
00227 
00228 
00229 
00230 
00231 #endif

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