Belle II Software  release-08-02-06
Line2D Class Reference

2D line. More...

#include <Line2D.h>

Inheritance diagram for Line2D:
Collaboration diagram for Line2D:

Public Member Functions

 Line2D (double x, double y, double vecx, double vecy)
 Constructor. More...
 
 ~Line2D ()
 Destructor.
 
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) const
 Find intersection with a line. More...
 
int findIntersection (const Circle2D &circle, HepGeom::Point3D< double > intersections[2]) const
 Find intersections with a circle. More...
 
int findIntersection (const Arc2D &arc, HepGeom::Point3D< double > intersections[2]) const
 Find intersections with an arc. More...
 
int findIntersection (const Line2D &line, HepGeom::Point3D< double > *intersection, double t[2]) const
 Find intersection with a line. More...
 

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. More...
 
int selectIntersections (HepGeom::Point3D< double > *intersections, bool *condition, int n) const
 Select intersections. More...
 

Protected Attributes

HepGeom::Point3D< double > m_Point
 Initial point.
 
HepGeom::Vector3D< double > m_Vector
 Vector.
 

Detailed Description

2D line.

Equation: m_Point + m_Vector * t

Definition at line 30 of file Line2D.h.

Constructor & Destructor Documentation

◆ Line2D()

Line2D ( double  x,
double  y,
double  vecx,
double  vecy 
)

Constructor.

Parameters
[in]xInitial point X coordinate.
[in]yInitial point y coordinate.
[in]vecxVector X component.
[in]vecyVector Y component.

Definition at line 17 of file Line2D.cc.

17  :
18  m_Point(x, y, 0),
19  m_Vector(vecx, vecy, 0)
20 {
21 }
HepGeom::Point3D< double > m_Point
Initial point.
Definition: Line2D.h:130
HepGeom::Vector3D< double > m_Vector
Vector.
Definition: Line2D.h:133

Member Function Documentation

◆ findIntersection() [1/5]

int findIntersection ( const Arc2D arc,
HepGeom::Point3D< double >  intersections[2] 
) const

Find intersections with an arc.

Parameters
[in]arcArc.
[out]intersectionsIntersections.
Returns
Number of intersections (0, 1 or 2).

Definition at line 43 of file Line2D.cc.

◆ findIntersection() [2/5]

int findIntersection ( const Circle2D circle,
HepGeom::Point3D< double >  intersections[2] 
) const

Find intersections with a circle.

Parameters
[in]circleCircle.
[out]intersectionsIntersections.
Returns
Number of intersections (0, 1 or 2).

Definition at line 35 of file Line2D.cc.

◆ findIntersection() [3/5]

int findIntersection ( const Circle2D circle,
HepGeom::Point3D< double >  intersections[2],
double  t[2],
double  angles[2] 
) const
protected

Find intersections with a circle.

Parameters
[in]circleCircle.
[out]intersectionsIntersections.
[out]tValues of t for intersection points.
[out]anglesValues of angles for intersection points.
Returns
Number of intersections (0, 1 or 2).

Definition at line 95 of file Line2D.cc.

◆ findIntersection() [4/5]

int findIntersection ( const Line2D line,
HepGeom::Point3D< double > *  intersection 
) const

Find intersection with a line.

Parameters
[in]lineLine.
[out]intersectionIntersection.
Returns
Number of intersections (0 or 1).

Definition at line 27 of file Line2D.cc.

◆ findIntersection() [5/5]

int findIntersection ( const Line2D line,
HepGeom::Point3D< double > *  intersection,
double  t[2] 
) const

Find intersection with a line.

Parameters
[in]lineLine.
[out]intersectionIntersection.
[out]tValues of t for intersection point (t[0] - this line, t[1] - line from argument).
Returns
Number of intersections (0 or 1).

If (*this) and line are the same line then 0 is returned.

Definition at line 65 of file Line2D.cc.

◆ selectIntersections()

int selectIntersections ( HepGeom::Point3D< double > *  intersections,
bool *  condition,
int  n 
) const
protected

Select intersections.

Parameters
[in,out]intersectionsIntersections.
[in]conditionSelection condition.
[in]nNumber of intersections.
Returns
Number of selected intersections.

Definition at line 132 of file Line2D.cc.


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