Skip to content

Commit

Permalink
rename SurfaceMeshGL::triangulate()
Browse files Browse the repository at this point in the history
prevent SurfaceMeshGL::triangulate() from shadowing
SurfaceMesh::triangulate()
  • Loading branch information
Mario Botsch committed Jun 2, 2020
1 parent e03b457 commit 73425e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/pmp/visualization/SurfaceMeshGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ void SurfaceMeshGL::update_opengl_buffers()
assert(cornerVertices.size() >= 3);

// tessellate face into triangles
triangulate(cornerPositions, triangles);
tesselate(cornerPositions, triangles);
for (auto& t : triangles)
{
int i0 = t[0];
Expand Down Expand Up @@ -654,8 +654,8 @@ void SurfaceMeshGL::draw(const mat4& projection_matrix,
glCheckError();
}

void SurfaceMeshGL::triangulate(const std::vector<vec3>& points,
std::vector<ivec3>& triangles)
void SurfaceMeshGL::tesselate(const std::vector<vec3>& points,
std::vector<ivec3>& triangles)
{
const int n = points.size();

Expand Down
4 changes: 2 additions & 2 deletions src/pmp/visualization/SurfaceMeshGL.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ class SurfaceMeshGL : public SurfaceMesh

// triangulate a polygon such that the sum of squared triangle areas is minimized.
// this prevents overlapping/folding triangles for non-convex polygons.
void triangulate(const std::vector<vec3>& points,
std::vector<ivec3>& triangles);
void tesselate(const std::vector<vec3>& points,
std::vector<ivec3>& triangles);

private:
//! OpenGL buffers
Expand Down

0 comments on commit 73425e1

Please sign in to comment.