#ifndef CORE_PLANE_H #define CORE_PLANE_H #include "math/Vector.h" #include "utils/ArrayString.h" namespace Core { class Plane final { Vector3 abc; float d; public: Plane(); Plane(const Vector3& a, const Vector3& b, const Vector3& c); float getSignedDistance(const Vector3& v) const; // returns true on error and calls the error callback template check_return bool toString(ArrayString& s) const { return s.append("(") || s.append(abc[0]) || s.append(" x + ") || s.append(abc[1]) || s.append(" y + ") || s.append(abc[2]) || s.append(" z + ") || s.append(d) || s.append(')'); } }; } #endif