HerdSoftware  0.3.2
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 (Point point, const float polar, const float azimuth)
 Constructor. More...
 
 Plane (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...
 
bool operator== (const Plane &rhs) const
 Comparison operator. More...
 

Private Attributes

Point _point
 
Vec3D _normal
 

Detailed Description

Class describing a Plane in the 3D space.

Constructor & Destructor Documentation

◆ Plane() [1/4]

Herd::Plane::Plane ( 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 ( Point  point,
Vec3D  normal 
)
inline

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
inline

Returns the normal to the plane.

Returns
the normal vector.

◆ operator==()

bool Herd::Plane::operator== ( const Plane rhs) const
inline

Comparison operator.

Parameters
rhsThe right-hand-side object of the comparison operation.
Returns
true if the two Planes are member-wise equal.

◆ 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

◆ _normal

Vec3D Herd::Plane::_normal
private

◆ _point

Point Herd::Plane::_point
private

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