SpatiumLib
|
#include <Plane.h>
Public Member Functions | |
Plane (const Point3 &origin, const Vector3 &normal) | |
Constructor. More... | |
Plane (const Vector3 &normal) | |
Constructor. More... | |
Plane (const Plane &other)=default | |
Copy constructor. More... | |
Plane & | operator= (const Plane &other)=default |
Assignment operator. More... | |
virtual | ~Plane ()=default |
Destructor. More... | |
void | origin (const Point3 &origin) |
Set origin of plane. More... | |
Point3 | origin () const |
Get origin of plane. More... | |
void | normal (const Vector3 &normal) |
Set normal of plane. More... | |
Vector3 | normal () const |
Get normal of plane. More... | |
double | distanceTo (const Point3 &point) const override |
Calculate Euclidean distance to point. More... | |
Point3 | projectPoint (const Point3 &point) const override |
Project point onto plane. More... | |
bool | intersectLine (const Point3 &origin, const Vector3 &direction, Point3 &intersection) const override |
Intersect line with plane. There is no intersection if the line is parallel to the plane. More... | |
Vector3 | projectVector (const Vector3 &vector) const |
Project vector onto plane. More... | |
![]() | |
Geometry ()=default | |
virtual | ~Geometry ()=default |
Protected Attributes | |
Point3 | m_origin |
Vector3 | m_normal |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Plane &plane) |
Output to ostream. More... | |
Plane geometry.
A plane is defined by a point (origin) and a vector perpendicular to the plane (normal).
Constructor.
[in] | origin | Origin |
[in] | normal | Normal |
|
inline |
Constructor.
[in] | normal | Normal |
|
default |
Copy constructor.
|
virtualdefault |
Destructor.
|
inlineoverridevirtual |
Calculate Euclidean distance to point.
[in] | point | Point |
Implements spatium::geom3d::Geometry.
|
inlineoverridevirtual |
Intersect line with plane. There is no intersection if the line is parallel to the plane.
[in] | origin | Origin of line |
[in] | direction | Direction of line |
[out] | intersection | Intersection point |
Implements spatium::geom3d::Geometry.
|
inline |
Set normal of plane.
[in] | normal | Normal |
|
inline |
Get normal of plane.
|
inline |
Set origin of plane.
[in] | origin | Origin |
|
inline |
Get origin of plane.
Project point onto plane.
[in] | point | Point |
Implements spatium::geom3d::Geometry.
|
friend |
Output to ostream.
|
protected |
|
protected |