Infinite plane in 3D space defined by normal and distance for efficient geometric calculations.
The Plane class represents an infinite mathematical plane in 3D space using the standard form of the plane equation: normalĀ·X + d = 0, where:
Key features:
Mathematical properties:
Common applications:
#include <plane.hpp>
Public Member Functions | |
constexpr | Plane () |
Default constructor. Creates XY plane at origin. | |
template<Precision P = Precision::Default> | |
Plane (const Vector3D &a, const Vector3D &b, const Vector3D &c) | |
Creates plane from three non-collinear points. | |
constexpr | Plane (const Vector3D &normal, const Vector3D &point) |
Creates plane from normal and point. | |
constexpr | Plane (const Vector3D &normal, Fxp d) |
Creates plane from normal and distance. | |
constexpr Fxp | Distance (const Vector3D &point) const |
Calculates signed distance from point to plane. | |
template<Precision P = Precision::Default> | |
constexpr Plane & | Normalize () |
Normalizes the plane equation. | |
constexpr Vector3D | Project (const Vector3D &point) const |
Projects point onto plane. | |
Public Attributes | |
Fxp | d |
Vector3D | normal |