TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ GetElevation()

float Mesh::GetElevation ( int  x,
int  y 
)

Definition at line 367 of file Mesh.cpp.

368{
369 if (!vert)
370 {
371 return 0;
372 }
373
374 int i = x + y * res;
375
376 if (i > vertexCount)
377 {
378 return 0;
379 }
380
381 return vert[i].position.y;
382}