From 560bfce98146895cfd8429150792d49a18e24d98 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 9 Apr 2023 13:15:46 +0100 Subject: Add lots of split required stuff to geometric plane --- lib/geometricPlane.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/geometricPlane.h') diff --git a/lib/geometricPlane.h b/lib/geometricPlane.h index 96816f2..dc8df50 100644 --- a/lib/geometricPlane.h +++ b/lib/geometricPlane.h @@ -1,12 +1,22 @@ #pragma once #include +#include + +class Ray; class GeometricPlane { public: + struct DistAndPosition { + float dist; + glm::vec3 position; + }; enum class PlaneRelation { Above, Below, On }; glm::vec3 origin, normal; PlaneRelation getRelation(glm::vec3 point) const; + std::optional getRayIntersectPosition(const Ray &) const; + + static bool isIntersect(PlaneRelation a, PlaneRelation b); }; -- cgit v1.2.3