// David Eberly, Geometric Tools, Redmond WA 98052 // Copyright (c) 1998-2020 // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt // https://www.geometrictools.com/License/Boost/LICENSE_1_0.txt // Version: 4.0.2019.08.13 #pragma once #include #include #include namespace WwiseGTE { template class DCPQuery, Plane3> { public: struct Result { Real distance, signedDistance; Vector3 planeClosestPoint; }; Result operator()(Vector3 const& point, Plane3 const& plane) { Result result; result.signedDistance = Dot(plane.normal, point) - plane.constant; result.distance = std::fabs(result.signedDistance); result.planeClosestPoint = point - result.signedDistance * plane.normal; return result; } }; }