#include <Trapezium.h>
◆ Trapezium() [1/2]
Herd::Trapezium::Trapezium |
( |
| ) |
|
|
default |
Constructor.
Builds an unspecified Trapezium.
◆ ~Trapezium()
virtual Herd::Trapezium::~Trapezium |
( |
| ) |
|
|
virtualdefault |
◆ Trapezium() [2/2]
Herd::Trapezium::Trapezium |
( |
std::array< Point, 4 > |
points | ) |
|
Constructor.
Builds the Trapezium region whose vertices are given by the points passed as argument. It is crucial that the points are passed in the correct order (doesn't matter if clockwise or counterclockwise)
- Parameters
-
- Exceptions
-
Herd::Exception | if the given points do not define a Trapezium (i.e. there is no pair of parallel sides or there are three collinear points). |
◆ Contains()
bool Herd::Trapezium::Contains |
( |
Point |
point | ) |
const |
|
virtual |
Checks if the Trapezium 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 |
Reimplemented in Herd::Parallelogram.
◆ Intersection()
std::optional< Point > Herd::Trapezium::Intersection |
( |
const Line & |
line | ) |
const |
Computes the intersection point of the given line with the Trapezium.
For a default-constructed Trapezium the returned intersection point is undefined.
- Parameters
-
- Returns
- Optional: The intersection point if it exists.
◆ operator!=()
bool Herd::Trapezium::operator!= |
( |
const Trapezium & |
rhs | ) |
const |
|
inline |
◆ operator==()
bool Herd::Trapezium::operator== |
( |
const Trapezium & |
rhs | ) |
const |
|
inline |
Comparison operator.
- Parameters
-
rhs | The right-hand-side object of the comparison operation. |
- Returns
- true if the two Trapezes are member-wise equal.
◆ Plane()
Gets the plane on which the Trapezium lies.
For a default-constructed Trapezium the returned plane is undefined.
- Returns
- The plane containing the Trapezium.
◆ Vertices()
std::array< Point, 4 > Herd::Trapezium::Vertices |
( |
| ) |
const |
Gets the vertices of the Trapezium.
For a default-constructed Trapezium the returned points are undefined.
- Returns
- The vertices of the Trapezium.
◆ m_plane
◆ m_vertices
std::array<Vec3D, 3> Herd::Trapezium::m_vertices |
|
protected |
The documentation for this class was generated from the following files:
- /builds/herd/HerdSoftware/include/herd/analysis/dataobjects/Trapezium.h
- /builds/herd/HerdSoftware/src/analysis/dataobjects/Trapezium.cpp