summaryrefslogtreecommitdiff
path: root/game/geoData.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-04-26 14:50:42 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-04-26 14:50:42 +0100
commit7dc3fa64ffe64d5fa01c59f7deed87dbc3b48c45 (patch)
treec56f431e2fb947b4127f3a4c21cc93a660248410 /game/geoData.cpp
parentDefine some initial surface types (diff)
downloadilt-7dc3fa64ffe64d5fa01c59f7deed87dbc3b48c45.tar.bz2
ilt-7dc3fa64ffe64d5fa01c59f7deed87dbc3b48c45.tar.xz
ilt-7dc3fa64ffe64d5fa01c59f7deed87dbc3b48c45.zip
Don't return newly created faces from split
It's not as simple as it looks as adjacent faces may also be split, making this a bit misleading.
Diffstat (limited to 'game/geoData.cpp')
-rw-r--r--game/geoData.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/game/geoData.cpp b/game/geoData.cpp
index e465ba0..68a1298 100644
--- a/game/geoData.cpp
+++ b/game/geoData.cpp
@@ -409,7 +409,7 @@ GeoData::triangleContainsTriangle(const Triangle<2> & a, const Triangle<2> & b)
return triangleContainsPoint(a.x, b) && triangleContainsPoint(a.y, b) && triangleContainsPoint(a.z, b);
}
-std::array<GeoData::FaceHandle, 4>
+void
GeoData::split(FaceHandle _fh)
{
// Collect halfedges of face
@@ -457,12 +457,10 @@ GeoData::split(FaceHandle _fh)
}
// Retriangulate
- return {
- add_face(v0, p0, v1),
- add_face(p2, v0, v2),
- add_face(v2, v1, p1),
- add_face(v2, v0, v1),
- };
+ add_face(v0, p0, v1);
+ add_face(p2, v0, v2);
+ add_face(v2, v1, p1);
+ add_face(v2, v0, v1);
}
void