TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ GetNormals()

glm::vec3 Mesh::GetNormals ( int  x,
int  y 
)

Definition at line 384 of file Mesh.cpp.

385{
386 if (!vert)
387 {
388 return glm::vec3(0);
389 }
390
391 int i = x + y * res;
392
393 if (i > vertexCount)
394 {
395 return glm::vec3(0);
396 }
397
398 return glm::vec3(vert[i].normal.x, vert[i].normal.y, vert[i].normal.z);
399}