Belle II Software development
|
2D line segment. More...
#include <LineSegment2D.h>
Public Member Functions | |
LineSegment2D (const HepGeom::Point3D< double > &point1, const HepGeom::Point3D< double > &point2) | |
Constructor. | |
~LineSegment2D () | |
Destructor. | |
int | findIntersection (const Line2D &line, HepGeom::Point3D< double > *intersection) const |
Find intersection with a line. | |
int | findIntersection (const LineSegment2D &lineSegment, HepGeom::Point3D< double > *intersection) const |
Find intersection with a line segment. | |
int | findIntersection (const Circle2D &circle, HepGeom::Point3D< double > intersections[2]) const |
Find intersections with a circle. | |
int | findIntersection (const Arc2D &arc, HepGeom::Point3D< double > intersections[2]) const |
Find intersections with an arc. | |
bool | tWithinRange (double t) const |
Check if t is within the line segment (0 <= t <= 1). | |
const HepGeom::Point3D< double > & | getInitialPoint () const |
Get initial point. | |
const HepGeom::Vector3D< double > & | getVector () const |
Get vector. | |
int | findIntersection (const Line2D &line, HepGeom::Point3D< double > *intersection, double t[2]) const |
Find intersection with a line. | |
Protected Member Functions | |
int | findIntersection (const Circle2D &circle, HepGeom::Point3D< double > intersections[2], double t[2], double angles[2]) const |
Find intersections with a circle. | |
int | selectIntersections (HepGeom::Point3D< double > *intersections, bool *condition, int n) const |
Select intersections. | |
Protected Attributes | |
HepGeom::Point3D< double > | m_Point |
Initial point. | |
HepGeom::Vector3D< double > | m_Vector |
Vector. | |
2D line segment.
Equation: m_Point + m_Vector * t, t = [0, 1].
Definition at line 28 of file LineSegment2D.h.
LineSegment2D | ( | const HepGeom::Point3D< double > & | point1, |
const HepGeom::Point3D< double > & | point2 | ||
) |
Constructor.
[in] | point1 | First point. |
[in] | point2 | Second point. |
Definition at line 14 of file LineSegment2D.cc.
~LineSegment2D | ( | ) |
int findIntersection | ( | const Arc2D & | arc, |
HepGeom::Point3D< double > | intersections[2] | ||
) | const |
Find intersections with an arc.
[in] | arc | Arc. |
[out] | intersections | Intersections. |
Definition at line 67 of file LineSegment2D.cc.
int findIntersection | ( | const Circle2D & | circle, |
HepGeom::Point3D< double > | intersections[2] | ||
) | const |
Find intersections with a circle.
[in] | circle | Circle. |
[out] | intersections | Intersections. |
Definition at line 54 of file LineSegment2D.cc.
|
protectedinherited |
Find intersections with a circle.
[in] | circle | Circle. |
[out] | intersections | Intersections. |
[out] | t | Values of t for intersection points. |
[out] | angles | Values of angles for intersection points. |
Definition at line 95 of file Line2D.cc.
int findIntersection | ( | const Line2D & | line, |
HepGeom::Point3D< double > * | intersection | ||
) | const |
Find intersection with a line.
[in] | line | Line. |
[out] | intersection | Intersection. |
Definition at line 25 of file LineSegment2D.cc.
|
inherited |
Find intersection with a line.
[in] | line | Line. |
[out] | intersection | Intersection. |
[out] | t | Values of t for intersection point (t[0] - this line, t[1] - line from argument). |
If (*this) and line are the same line then 0 is returned.
Definition at line 65 of file Line2D.cc.
int findIntersection | ( | const LineSegment2D & | lineSegment, |
HepGeom::Point3D< double > * | intersection | ||
) | const |
Find intersection with a line segment.
[in] | lineSegment | Line segment. |
[out] | intersection | Intersection. |
Definition at line 40 of file LineSegment2D.cc.
|
inlineinherited |
|
inlineinherited |
|
protectedinherited |
Select intersections.
[in,out] | intersections | Intersections. |
[in] | condition | Selection condition. |
[in] | n | Number of intersections. |
Definition at line 132 of file Line2D.cc.
bool tWithinRange | ( | double | t | ) | const |
Check if t is within the line segment (0 <= t <= 1).
[in] | t | Line parameter. |
Definition at line 80 of file LineSegment2D.cc.
|
protectedinherited |
|
protectedinherited |