Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef TERRAIN_H
- #define TERRAIN_H
- #include "vec3D.h"
- class Terrain
- {
- public:
- Terrain(int width, int height);
- ~Terrain();
- void setHeight(int x, int z, float y);
- int width() { return _width; }
- int length() { return _length; }
- float getHeight(int x, int z) { return heights[z][x]; }
- void computeNormals();
- vec3D getNormals(int x, int z);
- private:
- int _width;
- int _length;
- float** heights;
- vec3D** normals;
- bool computedNormals;
- };
- #endif // TERRAIN_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement