5 #include <glm/vec3.hpp>
12 class CESIUMGEOMETRY_API
Plane final {
57 Plane(const glm::dvec3& normal,
double distance);
71 Plane(const glm::dvec3& point, const glm::dvec3& normal);
76 const glm::dvec3& getNormal() const noexcept {
return this->_normal; }
86 double getDistance() const noexcept {
return this->_distance; }
A plane in Hessian Normal Format.
static const Plane ORIGIN_ZX_PLANE
The ZX plane passing through the origin, with normal in positive Y.
double getPointDistance(const glm::dvec3 &point) const noexcept
Computes the signed shortest distance of a point to this plane. The sign of the distance determines w...
static const Plane ORIGIN_YZ_PLANE
The YZ plane passing through the origin, with normal in positive X.
Plane() noexcept
Constructs a new plane with a +Z normal and a distance of 0.0.
glm::dvec3 projectPointOntoPlane(const glm::dvec3 &point) const noexcept
Projects a point onto this plane.
double getDistance() const noexcept
Gets the signed shortest distance from the origin to the plane. The sign of distance determines which...
static const Plane ORIGIN_XY_PLANE
The XY plane passing through the origin, with normal in positive Z.
Basic geometry classes for Cesium.