#include <primitives.h>
template<typename T>
Plane_ class
Represents a plane in 3d Euclidean space.
Contents
Public types
Constructors, destructors, conversion operators
Public functions
- auto IsValid() const -> bool
- Returns true if the plane has a valid normal vector.
-
auto Normal() const -> vec_
type - Returns the plane's normal vector.
- auto Offset() const -> T
- Returns the plane's offset, i.e. the distance from the plane to the coordinate system origin, measured along the plane's normal. Put differently, this is the minimum distance between the plane and the origin.
-
auto DistancePointToPlane(const vec_
type& pt) const -> T - Returns the distance from the given point to the plane.
-
auto IsPointInFrontOfPlane(const vec_
type& pt) const -> bool - Returns true if the given point is in front of the plane, i.e. the side where the plane's normal points to.
-
auto IsPointOnPlane(const vec_
type& pt) const -> bool - Returns true if the given point lies exactly on the plane.
-
auto AngleRad(const Plane_
& other) const -> double - Returns the dihedral angle, i.e. the angle between the two planes, in radians. The angle will be between 0 and Pi.
-
auto AngleDeg(const Plane_
& other) const -> double - Returns the dihedral angle, i.e. the angle between the two planes, in degrees. The angle will be between 0 and 180.
-
auto AngleRad(const Line3d_
<T>& line) const -> double - Returns the angle between this plane and the line in radians. The angle will be between -Pi/2 and Pi/2.
-
auto AngleDeg(const Line3d_
<T>& line) const -> double - Returns the angle between this plane and the line in degrees. The angle will be between -90 and +90.
-
auto XYZIntercepts() const -> vec_
type - Returns the plane's x-, y- and z-intercepts.
Friends
-
auto operator<<(std::ostream& stream,
const Plane_
& plane) -> std::ostream& - Overloaded output stream operator.