summaryrefslogtreecommitdiff
path: root/game/terrain2.h
diff options
context:
space:
mode:
Diffstat (limited to 'game/terrain2.h')
-rw-r--r--game/terrain2.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/game/terrain2.h b/game/terrain2.h
index f1d288e..da9f823 100644
--- a/game/terrain2.h
+++ b/game/terrain2.h
@@ -53,6 +53,13 @@ public:
return m->point(vh);
});
}
+
+ glm::vec<Dim, glm::vec2::value_type>
+ operator*(glm::vec2 bari) const
+ {
+ const auto & t {*this};
+ return t[0] + ((t[1] - t[0]) * bari.x) + ((t[2] - t[1]) * bari.y);
+ }
};
[[nodiscard]] FaceHandle findPoint(glm::vec2) const;