added function that procedurally generates heightfield
[demo] / src / meshgen.h
index bcd09ae..81880f6 100644 (file)
@@ -7,5 +7,7 @@ class Mesh;
 
 /* generates geodesic sphere: if hemi is true we only gen the hemisphere */
 void gen_geosphere(Mesh *mesh, float rad, int subdiv, bool hemi = false);
+void gen_heightfield(Mesh *mesh, float xsz, float ysz, float height, int usub,
+               int vsub, float (*calc_height)(float u, float v, void *ptr), void *ptr);
 
 #endif // MESHGEN_H_