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