HerdSoftware  0.1.1
Public Member Functions | Private Attributes | List of all members
Herd::Plane Class Reference

Class describing a Plane in the 3D space. More...

#include <dataobjects/Plane.h>

Public Member Functions

 Plane (const Point &point, const float polar, const float azimuth)
 Constructor. More...
 
 Plane (const Point &point, Vec3D normal)
 Constructor. More...
 
 Plane (std::array< Point, 3 > points)
 Constructor. More...
 
 Plane ()
 Default constructor. More...
 
virtual ~Plane ()=default
 Virtual destructor. More...
 
float Polar () const
 Returns the polar angle of the normal of the plane with respect to the NEGATIVE Z axis. More...
 
float Azimuth () const
 Returns the azimuth angle of the plane. More...
 
Vec3D Normal () const
 Returns the normal to the plane. More...
 
Point Origin () const
 Returns the "point of origin" of the plane. More...
 
Point Intersection (Line line) const
 Returns the intersect between this plane and a Line If the plane and line are parallel, a point with the default coordinate: [std::numeric_limits<float>::max(), std::numeric_limits<float>::max(), std::numeric_limits<float>::max()]. More...
 

Private Attributes

Point _point
 
float _polar
 
float _azimuth
 

Detailed Description

Class describing a Plane in the 3D space.

Constructor & Destructor Documentation

◆ Plane() [1/4]

Herd::Plane::Plane ( const Point point,
const float  polar,
const float  azimuth 
)

Constructor.

Constructs a infinite plane starting from a point on the plane (the "point of origin") and two angles defining the normal to the plane.

Parameters
pointA point on the plane [cm].
polarThe polar angle of the normal [rad].
azimuthThe azimuth angle of the normal [rad].

◆ Plane() [2/4]

Herd::Plane::Plane ( const Point point,
Vec3D  normal 
)

Constructor.

Constructs a infinite plane starting from a point on the plane (the "point of origin") and the normal vector to the plane.

Parameters
pointA point on the plane [cm].
normalThe normal vector.

◆ Plane() [3/4]

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

Constructor.

Constructs a infinite plane from three points, using one of the point ("point of origin") and the normal vector to the two vectors defined with the three points (the normal vector to the plane).

Parameters
pointsThe points defining the rectangle.
Exceptions
#Exceptionif the given points are aligned.

◆ Plane() [4/4]

Herd::Plane::Plane ( )

Default constructor.

Constructs a infinite plane with default value

Parameters
pointA point on the plane [cm].
polarThe polar angle of the normal [rad].
azimuthThe azimuth angle of the normal [rad].

◆ ~Plane()

virtual Herd::Plane::~Plane ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ Azimuth()

float Herd::Plane::Azimuth ( ) const
inline

Returns the azimuth angle of the plane.

Returns
the azimuth angle [rad].

◆ Intersection()

Point Herd::Plane::Intersection ( Line  line) const

Returns the intersect between this plane and a Line If the plane and line are parallel, a point with the default coordinate: [std::numeric_limits<float>::max(), std::numeric_limits<float>::max(), std::numeric_limits<float>::max()].

Parameters
linethe line
Returns
The point of the intersect.

◆ Normal()

Vec3D Herd::Plane::Normal ( ) const

Returns the normal to the plane.

Returns
the normal vector.

◆ Origin()

Point Herd::Plane::Origin ( ) const
inline

Returns the "point of origin" of the plane.

The "point of origin" is the point passed to the constructor to build the plane.

Returns
the "origin point" (cm, cm, cm).

◆ Polar()

float Herd::Plane::Polar ( ) const
inline

Returns the polar angle of the normal of the plane with respect to the NEGATIVE Z axis.

The angle is 0 for a plane with the normal along the Z axis towards the negative direction.

Returns
the polar angle [rad].

Member Data Documentation

◆ _azimuth

float Herd::Plane::_azimuth
private

◆ _point

Point Herd::Plane::_point
private

◆ _polar

float Herd::Plane::_polar
private

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