HerdSoftware
0.4.0
|
A parallelogram in 3D space. More...
#include <Parallelogram.h>
Public Member Functions | |
Parallelogram () | |
~Parallelogram () override=default | |
Destructor. More... | |
Parallelogram (std::array< Point, 3 > points) | |
bool | Contains (Point point) const override |
Checks if the parallelogram contains the given point. More... | |
bool | operator== (const Parallelogram &rhs) const |
Comparison operator. More... | |
bool | operator!= (const Parallelogram &rhs) const |
![]() | |
Trapezium ()=default | |
virtual | ~Trapezium ()=default |
Destructor. More... | |
Trapezium (std::array< Point, 4 > points) | |
Herd::Plane | Plane () const |
Gets the plane on which the Trapezium lies. More... | |
std::array< Point, 4 > | Vertices () const |
Gets the vertices of the Trapezium. More... | |
std::optional< Point > | Intersection (const Line &line) const |
Computes the intersection point of the given line with the Trapezium. More... | |
bool | operator== (const Trapezium &rhs) const |
Comparison operator. More... | |
bool | operator!= (const Trapezium &rhs) const |
Additional Inherited Members | |
![]() | |
Herd::Plane | m_plane |
std::array< Vec3D, 3 > | m_vertices |
A parallelogram in 3D space.
This class describes a parallelogrammatic region on a plane in 3D space.
|
default |
Constructor.
Builds an unspecified parallelogram.
|
overridedefault |
Destructor.
Herd::Parallelogram::Parallelogram | ( | std::array< Point, 3 > | points | ) |
Constructor.
Builds the parallelogrammatic region whose three vertices are given by the three points passed as argument (the fourth is automatically deduced).
points | The points defining the parallelogram. |
Herd::Exception | if the given points do not define a parallelogram. |
|
overridevirtual |
Checks if the parallelogram contains the given point.
No check is performed to verify if the point lies on the same plane. This is up to the user, and can easily be checked by making sure that the dot product between the point and the plane normal is zero.
point | The point to be checked |
Reimplemented from Herd::Trapezium.
|
inline |
|
inline |
Comparison operator.
rhs | The right-hand-side object of the comparison operation. |