summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-03-18 00:18:09 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-03-18 00:18:09 +0000
commit1dc1e08222f346d4434c52e524d199b4b8eeac1f (patch)
tree9377b7e01a039d4204bb97d653a8dda90b887892
parentAdd Ray::intersectPlane (diff)
downloadilt-1dc1e08222f346d4434c52e524d199b4b8eeac1f.tar.bz2
ilt-1dc1e08222f346d4434c52e524d199b4b8eeac1f.tar.xz
ilt-1dc1e08222f346d4434c52e524d199b4b8eeac1f.zip
Add non-default constructor to GeometricPlaneT
-rw-r--r--lib/geometricPlane.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/geometricPlane.h b/lib/geometricPlane.h
index 3b1a0e4..d4b803d 100644
--- a/lib/geometricPlane.h
+++ b/lib/geometricPlane.h
@@ -16,13 +16,17 @@ 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