Belle II Software development
LineSegment2D.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11/* KLM headers. */
12#include <klm/eklm/geometry/Line2D.h>
13
14/* CLHEP headers. */
15#include <CLHEP/Geometry/Point3D.h>
16
17namespace Belle2 {
22
23 namespace EKLM {
24
28 class LineSegment2D : public Line2D {
29
30 public:
31
38 const HepGeom::Point3D<double>& point2);
39
44
51 // cppcheck-suppress duplInheritedMember ; the line segment versions intentionally hide the Line2D ones
52 int findIntersection(const Line2D& line,
53 HepGeom::Point3D<double>* intersection) const;
54
61 int findIntersection(const LineSegment2D& lineSegment,
62 HepGeom::Point3D<double>* intersection) const;
63
70 // cppcheck-suppress duplInheritedMember ; the line segment versions intentionally hide the Line2D ones
71 int findIntersection(const Circle2D& circle,
72 HepGeom::Point3D<double> intersections[2]) const;
73
80 // cppcheck-suppress duplInheritedMember ; the line segment versions intentionally hide the Line2D ones
81 int findIntersection(const Arc2D& arc,
82 HepGeom::Point3D<double> intersections[2]) const;
83
88 static bool tWithinRange(double t);
89
90 };
91
92 }
93
95}
Line2D(double x, double y, double vecx, double vecy)
Constructor.
Definition Line2D.cc:17
int findIntersection(const Circle2D &circle, HepGeom::Point3D< double > intersections[2]) const
Find intersections with a circle.
int findIntersection(const Line2D &line, HepGeom::Point3D< double > *intersection) const
Find intersection with a line.
LineSegment2D(const HepGeom::Point3D< double > &point1, const HepGeom::Point3D< double > &point2)
Constructor.
static bool tWithinRange(double t)
Check if t is within the line segment (0 <= t <= 1).
int findIntersection(const Arc2D &arc, HepGeom::Point3D< double > intersections[2]) const
Find intersections with an arc.
Abstract base class for different kinds of events.