123456789101112 |
- #include "math/Plane.hpp"
- Core::Plane::Plane() : abc(), d(0) {
- }
- Core::Plane::Plane(const Vector3& a, const Vector3& b, const Vector3& c)
- : abc((b - a).cross(c - a).normalize()), d(-abc.dot(b)) {
- }
- float Core::Plane::getSignedDistance(const Vector3& v) const {
- return abc.dot(v) + d;
- }
|