#include <Terrain.h>
Public Member Functions | |
CTerrain () | |
Standard constructor. | |
~CTerrain () | |
Standard destructor. | |
bool | Init (HWND hWnd, LPDIRECT3DDEVICE9 device, int screenWidth, int screenHeight) |
Init function loads terrain models. | |
void | OnRender (LPDIRECT3DDEVICE9 pd3dDevice, bool details) |
Render function draws terrain models on the screen. | |
void | OnFrameMove (LPDIRECT3DDEVICE9 pd3dDevice, double fTime, float fElapsedTime, bool details) |
Positions all models arround the terrain forming scenography. Also animates moveable objects (if any). | |
void | OnLostDevice () |
Its important to call this function BEFORE device is reset, like when switching to/from fullscreen mode. | |
void | OnResetDevice (LPDIRECT3DDEVICE9 pd3dDevice) |
Its important to call this function AFTER device is reset, like when switching to/from fullscreen mode. |
CTerrain manages all static meshes on the game level. There is no collision detection with the terrain and no multiple scenes.
CTerrain::CTerrain | ( | ) |
Standard constructor.
CTerrain::~CTerrain | ( | ) |
Standard destructor.
bool CTerrain::Init | ( | HWND | hWnd, | |
LPDIRECT3DDEVICE9 | pd3dDevice, | |||
int | screenWidth, | |||
int | screenHeight | |||
) |
Init function loads terrain models.
void CTerrain::OnRender | ( | LPDIRECT3DDEVICE9 | pd3dDevice, | |
bool | details | |||
) |
Render function draws terrain models on the screen.
details | boolean telling if details should be rendered (on slower graphics, low details can speed up framerate) |
Treez 2
void CTerrain::OnFrameMove | ( | LPDIRECT3DDEVICE9 | pd3dDevice, | |
double | fTime, | |||
float | fElapsedTime, | |||
bool | details | |||
) |
Positions all models arround the terrain forming scenography. Also animates moveable objects (if any).
void CTerrain::OnLostDevice | ( | ) |
Its important to call this function BEFORE device is reset, like when switching to/from fullscreen mode.
void CTerrain::OnResetDevice | ( | LPDIRECT3DDEVICE9 | pd3dDevice | ) |
Its important to call this function AFTER device is reset, like when switching to/from fullscreen mode.