HerdSoftware  0.4.0
Public Member Functions | List of all members
Herd::Rectangle Class Reference

A rectangle in 3D space. More...

#include <Rectangle.h>

Inheritance diagram for Herd::Rectangle:
Herd::Parallelogram Herd::Trapezium

Public Member Functions

 Rectangle ()
 
 Rectangle (std::array< Point, 3 > points)
 
- Public Member Functions inherited from Herd::Parallelogram
 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
 
- Public Member Functions inherited from Herd::Trapezium
 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< PointIntersection (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

- Protected Attributes inherited from Herd::Trapezium
Herd::Plane m_plane
 
std::array< Vec3D, 3 > m_vertices
 

Detailed Description

A rectangle in 3D space.

This class describes a rectangular region on a plane in 3D space.

Constructor & Destructor Documentation

◆ Rectangle() [1/2]

Herd::Rectangle::Rectangle ( )
inline

Constructor.

Builds an unspecified rectangle.

◆ Rectangle() [2/2]

Herd::Rectangle::Rectangle ( std::array< Point, 3 >  points)

Constructor.

Builds the rectangular region whose three vertices are given by the three points passed as argument (the fourth is automatically deduced).

Parameters
pointsThe points defining the rectangle.
Exceptions
Herd::Exceptionif the given points do not define a rectangle.

The documentation for this class was generated from the following files: