Class describing a line in the 3D space.
More...
#include <dataobjects/Line.h>
|
| Line () |
| Default Constructor. More...
|
|
| Line (const Point &point, const float polar, const float azimuth) |
| Constructor. More...
|
|
| Line (const Point &point, const Vec3D &direction) |
| Constructor. More...
|
|
| Line (const Line2D &proj1, RefFrame::View view1, const Line2D &proj2, RefFrame::View view2) |
| Constructor. More...
|
|
virtual | ~Line ()=default |
| Virtual destructor. More...
|
|
float | Polar () const |
| Returns the polar angle of the line with respect to the NEGATIVE Z axis. More...
|
|
float | Azimuth () const |
| Returns the azimuth angle of the line. More...
|
|
Point | Origin () const |
| Returns the "point of origin" of the line. More...
|
|
Vec3D | Direction () const |
| Returns direction of the line. More...
|
|
Point | Intersection (RefFrame::Axis axis, float coo) const |
| Returns the line coordinate at given plane, defined by its normal axis and the coordinate along that axis. More...
|
|
Point | Intersection (const Line &line) const |
| Returns the coordinate of the vertex between two lines: the intersection point if the lines are secant and the point at the midle of the minimal segment between the two lines if they are not secant. More...
|
|
Line | Projection (const Plane &plane) const |
| Computes the projection of the line on a given plane. More...
|
|
Line | Projection (const Point p, RefFrame::View view) const |
| Computes the projection of the line on a given view plane, passing for a given point. More...
|
|
Line2D | Projection2D (RefFrame::View view) const |
| Computes the 2D projection of the line on a given view. More...
|
|
double | DistanceToPoint (const Point p) const |
| Computes the distance of a point to the line. More...
|
|
double | MinimumDistanceToLine (const Line line) const |
| Computes the minimum distance between two lines. More...
|
|
Class describing a line in the 3D space.
◆ Line() [1/4]
◆ Line() [2/4]
Herd::Line::Line |
( |
const Point & |
point, |
|
|
const float |
polar, |
|
|
const float |
azimuth |
|
) |
| |
Constructor.
Constructs a line starting from a point and two angles.
- Parameters
-
point | A point on the line [cm]. |
polar | The polar angle of the line [rad]. |
azimuth | The azimuth angle of the line [rad]. |
◆ Line() [3/4]
Herd::Line::Line |
( |
const Point & |
point, |
|
|
const Vec3D & |
direction |
|
) |
| |
Constructor.
Constructs a line starting from a point and a vector.
- Parameters
-
point | A point on the line [cm]. |
direction | the direction of the line. |
◆ Line() [4/4]
Constructor.
Constructs a 3D line starting from two 2D projections.
- Parameters
-
proj1 | The first projection. |
view1 | The view of the first projection. |
proj2 | The second projection. |
view1 | The view of the second projection. |
◆ ~Line()
virtual Herd::Line::~Line |
( |
| ) |
|
|
virtualdefault |
◆ Azimuth()
float Herd::Line::Azimuth |
( |
| ) |
const |
Returns the azimuth angle of the line.
If the line is parallel to the Z axis an exception is thrown
- Returns
- the azimuth angle (rad) in the range [0,2pi].
- Exceptions
-
◆ Direction()
Vec3D Herd::Line::Direction |
( |
| ) |
const |
Returns direction of the line.
- Returns
- the direction vector.
◆ DistanceToPoint()
double Herd::Line::DistanceToPoint |
( |
const Point |
p | ) |
const |
Computes the distance of a point to the line.
- Parameters
-
- Returns
- the distance of the point from the line
◆ Intersection() [1/2]
Returns the line coordinate at given plane, defined by its normal axis and the coordinate along that axis.
- Parameters
-
axis | The normal axis of the plane. |
coo | The coordinate of the requested point along the normal axis to the plane. |
- Returns
- The coordinate of the line at intersection point.
- Exceptions
-
◆ Intersection() [2/2]
Point Herd::Line::Intersection |
( |
const Line & |
line | ) |
const |
Returns the coordinate of the vertex between two lines: the intersection point if the lines are secant and the point at the midle of the minimal segment between the two lines if they are not secant.
- Parameters
-
line | Line to compute the vertex point with |
- Returns
- The coordinate of vertex point with the previous line.
- Exceptions
-
◆ MinimumDistanceToLine()
double Herd::Line::MinimumDistanceToLine |
( |
const Line |
line | ) |
const |
Computes the minimum distance between two lines.
- Parameters
-
- Returns
- the minimum distance between the two lines
◆ Origin()
Point Herd::Line::Origin |
( |
| ) |
const |
|
inline |
Returns the "point of origin" of the line.
This is arbitrarily chosen to lie on the line
- Returns
- the "origin point" (cm, cm).
◆ Polar()
float Herd::Line::Polar |
( |
| ) |
const |
|
inline |
Returns the polar angle of the line with respect to the NEGATIVE Z axis.
The angle is 0 for lines whose direction if towards the negative Z axis.
- Returns
- the polar angle (rad) in the range [0,pi].
◆ Projection() [1/2]
Line Herd::Line::Projection |
( |
const Plane & |
plane | ) |
const |
Computes the projection of the line on a given plane.
- Parameters
-
plane | The projection plane. |
- Returns
- a The projected line.
◆ Projection() [2/2]
Computes the projection of the line on a given view plane, passing for a given point.
- Parameters
-
p | The plane point. |
view | The plane orientation. |
- Returns
- a The projected line.
◆ Projection2D()
Computes the 2D projection of the line on a given view.
- Parameters
-
view | The projection plane. |
- Returns
- a The projected line.
◆ _azimuth
float Herd::Line::_azimuth |
|
private |
◆ _point
◆ _polar
The documentation for this class was generated from the following files:
- /builds/herd/HerdSoftware/include/analysis/dataobjects/Line.h
- /builds/herd/HerdSoftware/src/analysis/dataobjects/Line.cpp