From b6a1241678b621189d550ab2d76dc1830a312356 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Mon, 25 Jul 2016 12:51:29 -1000 Subject: [PATCH] Add CPlane::pointToPlaneDistance --- include/zeus/CPlane.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/zeus/CPlane.hpp b/include/zeus/CPlane.hpp index ec490aa..36bec88 100644 --- a/include/zeus/CPlane.hpp +++ b/include/zeus/CPlane.hpp @@ -50,6 +50,11 @@ public: d = nd * mag; } + float pointToPlaneDist(const zeus::CVector3f& pos) const + { + return pos.dot(vec) - d; + } + union { struct {