TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ GetTexCoord()

glm::vec2 Mesh::GetTexCoord ( float  x,
float  y,
float  z 
)

Definition at line 418 of file Mesh.cpp.

419{
420 if (currType == MeshType::Plane)
421 {
422 return (glm::vec2(x, y) / ((float)res - 1)) * texSc;
423 }
424
425 else
426 {
427 return glm::vec2(1.0f);
428 }
429}