A parallelogram in 3D space.
More...
#include <Parallelogram.h>
A parallelogram in 3D space.
This class describes a parallelogrammatic region on a plane in 3D space.
◆ Parallelogram() [1/2]
Herd::Parallelogram::Parallelogram |
( |
| ) |
|
|
default |
Constructor.
Builds an unspecified parallelogram.
◆ ~Parallelogram()
virtual Herd::Parallelogram::~Parallelogram |
( |
| ) |
|
|
virtualdefault |
◆ Parallelogram() [2/2]
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).
- Parameters
-
points | The points defining the parallelogram. |
- Exceptions
-
#Exception | if the given points do not define a parallelogram. |
◆ Contains()
bool Herd::Parallelogram::Contains |
( |
const Point & |
point | ) |
const |
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.
- Parameters
-
point | The point to be checked |
◆ Intersection()
Point Herd::Parallelogram::Intersection |
( |
const Line & |
line | ) |
const |
Computes the intersection point of the given line with the parallelogram.
For a default-constructed Parallelogram the returned intersection point is undefined.
- Parameters
-
- Returns
- The intersection point if it exists, otherwise a default-initialized Point object.
◆ operator!=()
bool Herd::Parallelogram::operator!= |
( |
const Parallelogram & |
rhs | ) |
const |
|
inline |
◆ operator==()
bool Herd::Parallelogram::operator== |
( |
const Parallelogram & |
rhs | ) |
const |
|
inline |
Comparison operator.
- Parameters
-
rhs | The right-hand-side object of the comparison operation. |
- Returns
- true if the two Parallelograms are member-wise equal.
◆ Plane()
Gets the plane on which the parallelogram lies.
For a default-constructed Parallelogram the returned plane is undefined.
- Returns
- The plane containing the parallelogram.
◆ Vertices()
std::array< Point, 4 > Herd::Parallelogram::Vertices |
( |
| ) |
const |
Gets the vertices of the parallelogram.
For a default-constructed Parallelogram the returned points are undefined.
- Returns
- The vertices of the parallelogram.
◆ _plane
◆ _vertices
std::array<Vec3D, 2> Herd::Parallelogram::_vertices |
|
protected |
The documentation for this class was generated from the following files: