The terrain generation was pretty fun besides a couple errors. One is still presently the bane of my existence: a compiler error c2011 which is a type redefinition that just points to a class and crashes, and Microsoft’s explanation isn’t helpful. And it doesn’t stop for the debugger either.
However it crashed when I was fiddling with my project to implement feature 5, so the current working build is for this feature, working camera along x,y and z axis, here are some pictures.
The terrain has the size of 129, cap height of 50, and a decay factor of 0.50.
Problems I encountered to code this:
c++’s rand() is not the same as Java’s Math.rand() : rand() % 3 == Math.rand() * 2
Mistaking the command %d for printf’s for doubles, I was trying %d to print out a float, which was giving me garbage.
Just getting the translation down between ruby and c++ and the conversion of the imaginary 2-d grid to the actual float* array.
Lastly which is hinting on feature 5, learning how to access the terrain and comparing it to the cameras position, basically the problem is the constructor returning a pointer instead of the object, my Java mindset.