Revision 1378,
1.3 KB
checked in by giegl, 18 years ago
(diff) |
GTPD - Jungle Rumble - integrate into GTP SVN structure
|
Rev | Line | |
---|
[1378] | 1 | #pragma once
|
---|
| 2 | #include "./Object3d.h"
|
---|
| 3 | #include "./GameManager.h"
|
---|
| 4 | #include <boost/shared_ptr.hpp>
|
---|
| 5 | #include "Node.h"
|
---|
| 6 |
|
---|
| 7 | using namespace std;
|
---|
| 8 |
|
---|
| 9 | #define SPTR boost::shared_ptr
|
---|
| 10 |
|
---|
| 11 | class Ocean: public Node
|
---|
| 12 | {
|
---|
| 13 | public:
|
---|
| 14 | Ocean(void);
|
---|
| 15 | ~Ocean(void);
|
---|
| 16 | void generateOcean(float deepC [4], float shallowC [4]);
|
---|
| 17 | void setTextures(std::string texture0, std::string texture1, std::string watermap);
|
---|
| 18 |
|
---|
| 19 | private:
|
---|
| 20 | struct Vertex
|
---|
| 21 | {
|
---|
| 22 | Vertex(float _x, float _y, float _z, float _nx, float _ny, float _nz, DWORD _color, float _u, float _v)
|
---|
| 23 | {
|
---|
| 24 | x = _x;
|
---|
| 25 | y = _y;
|
---|
| 26 | z = _z;
|
---|
| 27 | nx = _nx;
|
---|
| 28 | ny = _ny;
|
---|
| 29 | nz = _nz;
|
---|
| 30 | color = _color;
|
---|
| 31 | u = _u;
|
---|
| 32 | v = _v;
|
---|
| 33 | }
|
---|
| 34 |
|
---|
| 35 | float x, y, z;
|
---|
| 36 | float nx, ny, nz;
|
---|
| 37 | DWORD color;
|
---|
| 38 | float u, v;
|
---|
| 39 |
|
---|
| 40 | enum FVF
|
---|
| 41 | {
|
---|
| 42 | FVF_Flags = D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE | D3DFVF_TEX1
|
---|
| 43 | };
|
---|
| 44 | };
|
---|
| 45 |
|
---|
| 46 | void loadEffect(float *deepC, float *shallowC);
|
---|
| 47 |
|
---|
| 48 | std::string texture0;
|
---|
| 49 | std::string texture1;
|
---|
| 50 | std::string watermap;
|
---|
| 51 |
|
---|
| 52 | std::vector<Object3d*> oceanPatches;
|
---|
| 53 |
|
---|
| 54 | Vector *normals;
|
---|
| 55 |
|
---|
| 56 | D3DMATERIAL9 *standardMats;
|
---|
| 57 | std::vector<IDirect3DTexture9*> Textures;
|
---|
| 58 |
|
---|
| 59 | //effect:
|
---|
| 60 | ID3DXEffect* OceanEffect;
|
---|
| 61 | D3DXHANDLE TexHandleWaves;
|
---|
| 62 | D3DXHANDLE TexHandleCubemap;
|
---|
| 63 | D3DXHANDLE TexHandleTerrain;
|
---|
| 64 |
|
---|
| 65 | D3DXHANDLE ShallowColorHandle;
|
---|
| 66 | D3DXHANDLE DeepColorHandle;
|
---|
| 67 | D3DXHANDLE DimensionHandle;
|
---|
| 68 | };
|
---|
Note: See
TracBrowser
for help on using the repository browser.