summaryrefslogtreecommitdiff
path: root/lib/geometricPlane.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/geometricPlane.h')
-rw-r--r--lib/geometricPlane.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/geometricPlane.h b/lib/geometricPlane.h
index 3f95d3c..d4b803d 100644
--- a/lib/geometricPlane.h
+++ b/lib/geometricPlane.h
@@ -16,18 +16,22 @@ public:
template<typename PositionType> class GeometricPlaneT : public GeometricPlane {
public:
+ GeometricPlaneT() = default;
+
+ GeometricPlaneT(PositionType origin, Normal3D normal) : origin(std::move(origin)), normal(normal) { }
+
struct DistAndPosition {
PositionType::value_type dist;
PositionType position;
};
- PositionType origin;
- Normal3D normal;
+ PositionType origin {};
+ Normal3D normal {};
[[nodiscard]] inline PlaneRelation
getRelation(PositionType point) const
{
- const auto d = glm::dot(normal, point - origin);
+ const auto d = glm::dot(normal, RelativePosition3D(point - origin));
return d < 0.F ? PlaneRelation::Below : d > 0.F ? PlaneRelation::Above : PlaneRelation::On;
}