summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-11-23 14:04:28 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-11-23 14:04:28 +0000
commit1523401911b46d220ddc597c136fe279324d600b (patch)
treee5bb112dd0d22eea478c50b17d5ec48c13aed8d1
parentShare code between boundary and strip edge node reuse (diff)
downloadilt-1523401911b46d220ddc597c136fe279324d600b.tar.bz2
ilt-1523401911b46d220ddc597c136fe279324d600b.tar.xz
ilt-1523401911b46d220ddc597c136fe279324d600b.zip
Remove split face specialisation
-rw-r--r--game/geoData.cpp54
-rw-r--r--game/geoData.h3
2 files changed, 0 insertions, 57 deletions
diff --git a/game/geoData.cpp b/game/geoData.cpp
index fef7c34..a63e03b 100644
--- a/game/geoData.cpp
+++ b/game/geoData.cpp
@@ -410,60 +410,6 @@ GeoData::triangleContainsTriangle(const Triangle<2> & a, const Triangle<2> & b)
return triangleContainsPoint(a.x, b) && triangleContainsPoint(a.y, b) && triangleContainsPoint(a.z, b);
}
-void
-GeoData::split(FaceHandle _fh)
-{
- // Collect halfedges of face
- const HalfedgeHandle he0 = halfedge_handle(_fh);
- const HalfedgeHandle he1 = next_halfedge_handle(he0);
- const HalfedgeHandle he2 = next_halfedge_handle(he1);
-
- const EdgeHandle eh0 = edge_handle(he0);
- const EdgeHandle eh1 = edge_handle(he1);
- const EdgeHandle eh2 = edge_handle(he2);
-
- // Collect points of face
- const VertexHandle p0 = to_vertex_handle(he0);
- const VertexHandle p1 = to_vertex_handle(he1);
- const VertexHandle p2 = to_vertex_handle(he2);
-
- // Calculate midpoint coordinates
- const Point new0 = centre(he0);
- const Point new1 = centre(he1);
- const Point new2 = centre(he2);
-
- // Add vertices at midpoint coordinates
- const VertexHandle v0 = add_vertex(new0);
- const VertexHandle v1 = add_vertex(new1);
- const VertexHandle v2 = add_vertex(new2);
-
- const bool split0 = !is_boundary(eh0);
- const bool split1 = !is_boundary(eh1);
- const bool split2 = !is_boundary(eh2);
-
- // delete original face
- delete_face(_fh, false);
-
- // split boundary edges of deleted face ( if not boundary )
- if (split0) {
- split(eh0, v0);
- }
-
- if (split1) {
- split(eh1, v1);
- }
-
- if (split2) {
- split(eh2, v2);
- }
-
- // Retriangulate
- add_face(v0, p0, v1);
- add_face(p2, v0, v2);
- add_face(v2, v1, p1);
- add_face(v2, v0, v1);
-}
-
static constexpr RelativeDistance MAX_SLOPE = .5F;
void
diff --git a/game/geoData.h b/game/geoData.h
index ed1734c..5daa7a4 100644
--- a/game/geoData.h
+++ b/game/geoData.h
@@ -185,9 +185,6 @@ protected:
void update_vertex_normals_only();
void update_vertex_normals_only(VertexIter start);
- using OpenMesh::TriMesh_ArrayKernelT<GeoDataTraits>::split;
- void split(FaceHandle);
-
private:
GlobalPosition3D lowerExtent {}, upperExtent {};
};