Im programming a small project, an opengl height map. It is build of triangles, which points are fit to the right y position (read out of an image).
The player is represanted by a cuboid. (p1, p2, ... p8). now, i want to implement collision detection between the player and the heightmap.
I thought about split the whole world in cubes, and this cubes again in cubes, and then distribute the triangles of the heightmap in this cubes (then check for the big cube, the smaller cube, which contains the player, and then check all triangles for collision).
But which collision detection method would be the best here, and how could i implement it? (By the way, im using lwjgl [java])