HerdSoftware
0.1.1
|
A parallelogram in 3D space. More...
#include <Parallelogram.h>
Public Member Functions | |
Parallelogram () | |
virtual | ~Parallelogram ()=default |
Destructor. More... | |
Parallelogram (std::array< Point, 3 > points) | |
Herd::Plane | Plane () const |
Gets the plane on which the parallelogram lies. More... | |
std::array< Point, 4 > | Vertices () const |
Gets the vertices of the parallelogram. More... | |
Point | Intersection (const Line &line) const |
Computes the intersection point of the given line with the parallelogram. More... | |
Protected Attributes | |
Herd::Plane | _plane |
std::array< Vec3D, 2 > | _vertices |
A parallelogram in 3D space.
This class describes a parallelogrammatic region on a plane in 3D space.
Herd::Parallelogram::Parallelogram | ( | ) |
Constructor.
Builds an unspecified parallelogram.
|
virtualdefault |
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. |
#Exception | if the given points do not define a parallelogram. |
Computes the intersection point of the given line with the parallelogram.
For a default-constructed Parallelogram the returned intersection point is undefined.
line | The line. |
Herd::Plane Herd::Parallelogram::Plane | ( | ) | const |
Gets the plane on which the parallelogram lies.
For a default-constructed Parallelogram the returned plane is undefined.
std::array< Point, 4 > Herd::Parallelogram::Vertices | ( | ) | const |
Gets the vertices of the parallelogram.
For a default-constructed Parallelogram the returned points are undefined.
|
protected |
|
protected |