-
Notifications
You must be signed in to change notification settings - Fork 0
/
LandEnvironment.h
69 lines (60 loc) · 2.21 KB
/
LandEnvironment.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// -------------------------------------------------------------------------
// Sean Janis
// spjanis@gmail.com
// Water Simulations
//
// CLandEnvironment
// Creates a surrounding environment for our water simulation demo
// using Environment Mapping.
// -------------------------------------------------------------------------
#pragma once
#include <string>
#include <deque>
#include <d3d9.h>
#include <d3dx9.h>
//#include <dxerr9.h>
#include "DXUT.h"
#include "DXUTcamera.h"
#include "AnimationObject.h"
using namespace std;
class CLandEnvironment :
public CAnimationObject
{
public:
CLandEnvironment(IDirect3DDevice9* pDirect3D9Device);
~CLandEnvironment();
virtual bool Init();
// -------------------------------------------------------------------------
// Animation Object Interface Methods
// -------------------------------------------------------------------------
virtual void Update(float fCurrentTime, bool blMoveObject = false);
virtual void Draw(
D3DXMATRIX& projectionMatrix,
D3DXMATRIX& viewMatrix);
// -------------------------------------------------------------------------
// General Accessors / Mutators
// -------------------------------------------------------------------------
IDirect3DCubeTexture9* GetEnvironmentMap();
float GetSkyRadius();
void SetCamera(CFirstPersonCamera& camera);
protected:
//--------------------------------------------------------------------------
// Initialization Methods
//--------------------------------------------------------------------------
virtual bool LoadShadingFX();
private:
// -------------------------------------------------------------------------
// DirectX Data
// -------------------------------------------------------------------------
ID3DXEffect* m_pFX;
ID3DXMesh* m_pSphere;
IDirect3DCubeTexture9* m_pEnvironmentMap;
CFirstPersonCamera m_Camera;
float m_fRadius;
//--------------------------------------------------------------------------
// Lighting and Environment Mapping
//--------------------------------------------------------------------------
D3DXHANDLE m_hParam_EnvironmentTechnique;
D3DXHANDLE m_hParam_EnvironmentMap;
D3DXHANDLE m_hParam_WVP;
};