2 #ifndef SHADY_TERRAIN_HPP
3 #define SHADY_TERRAIN_HPP
5 #include "transform.hpp"
13 terrain(int res
, float size
, float height
);
16 void generate(int randres
, float divisor
, float power
, int seed
);
20 void generateVertices();
22 void drawVertices(vec pos
) const;
24 float heightAt(float x
, float y
) const;
42 float xVal(int x
, int y
) const;
43 float yVal(int x
, int y
) const;
44 float zVal(int x
, int y
) const;
46 void drawGlVertex(int x
, int y
) const;
48 static void setVertexArray(Vertex
* vert
);
58 void addRect(std::vector
<unsigned short> & d
, int x0
, int x1
, int y0
, int y1
, vec pos
, ToCenter tc
) const;
60 bool isSubdivided(int x0
, int x1
, int y0
, int y1
, vec pos
) const;
66 #endif // SHADY_TERRAIN_HPP