summaryrefslogtreecommitdiff
path: root/game/geoData.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/geoData.cpp')
-rw-r--r--game/geoData.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/game/geoData.cpp b/game/geoData.cpp
index 8e662b3..eef5dc7 100644
--- a/game/geoData.cpp
+++ b/game/geoData.cpp
@@ -601,3 +601,13 @@ GeoData::setHeights(const std::span<const GlobalPosition3D> triangleStrip, const
updateAllVertexNormals(newOrChangedVerts);
}
+
+void
+GeoData::sanityCheck() const
+{
+ if (!std::ranges::all_of(faces(), [this](const auto face) {
+ return triangle<2>(face).isUp();
+ })) {
+ throw std::logic_error("Upside down faces detected");
+ }
+}