ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::LineIntersection2D Struct Reference

#include <LineIntersection2D.h>

Collaboration diagram for Trk::LineIntersection2D:

Public Member Functions

 LineIntersection2D (double x1, double y1, double x2, double y2, double X1, double Y1, double X2, double Y2)

Public Attributes

bool valid
double interX
double interY
double k
double K
double d
double D

Detailed Description

Definition at line 31 of file LineIntersection2D.h.

Constructor & Destructor Documentation

◆ LineIntersection2D()

Trk::LineIntersection2D::LineIntersection2D ( double x1,
double y1,
double x2,
double y2,
double X1,
double Y1,
double X2,
double Y2 )
inline

Definition at line 39 of file LineIntersection2D.h.

47 {
48 // diffs, k's and d's
49 double deltax = x2 - x1;
50 double deltay = y2 - y1;
51 double deltaX = X2 - X1;
52 double deltaY = Y2 - Y1;
53 k = deltay / deltax;
54 K = deltaY / deltaX;
55 d = y2 - k * x2;
56 D = Y2 - K * X2;
57 // check if valid
58 valid = ((k - K) * (k - K) > NUMERICALSTABLE);
59 if (valid) {
60 interX = (D - d) / (k - K);
61 interY = interX * k + d;
62 } else {
63 interX = -99999.;
64 interY = -99999.;
65 }
66 }
#define NUMERICALSTABLE

Member Data Documentation

◆ D

double Trk::LineIntersection2D::D

Definition at line 37 of file LineIntersection2D.h.

◆ d

double Trk::LineIntersection2D::d

Definition at line 37 of file LineIntersection2D.h.

◆ interX

double Trk::LineIntersection2D::interX

Definition at line 35 of file LineIntersection2D.h.

◆ interY

double Trk::LineIntersection2D::interY

Definition at line 36 of file LineIntersection2D.h.

◆ K

double Trk::LineIntersection2D::K

Definition at line 37 of file LineIntersection2D.h.

◆ k

double Trk::LineIntersection2D::k

Definition at line 37 of file LineIntersection2D.h.

◆ valid

bool Trk::LineIntersection2D::valid

Definition at line 34 of file LineIntersection2D.h.


The documentation for this struct was generated from the following file: