#include <TPoint2D.h>
Public Member Functions | |
TPoint2D () | |
Constructors. | |
TPoint2D (double, double) | |
TPoint2D (const HepPoint3D &) | |
TPoint2D (const HepVector3D &) | |
virtual | ~TPoint2D () |
Destructor. | |
double | x (void) const |
double | y (void) const |
double | mag (void) const |
double | mag2 (void) const |
double | phi (void) const |
double | x (double) |
double | y (double) |
double | dot (const TPoint2D &) const |
double | cross (const TPoint2D &) const |
TPoint2D | unit (void) const |
TPoint2D | operator+ (const TPoint2D &) const |
TPoint2D | operator- (const TPoint2D &) const |
TPoint2D | operator- () const |
bool | operator== (const TPoint2D &) const |
Private Attributes | |
double | _p [2] |
Definition at line 37 of file TPoint2D.h.
TPoint2D::TPoint2D | ( | ) |
Constructors.
Definition at line 19 of file TPoint2D.cxx.
References _p.
Referenced by operator+(), operator-(), and unit().
TPoint2D::TPoint2D | ( | double | , | |
double | ||||
) |
TPoint2D::TPoint2D | ( | const HepPoint3D & | ) |
TPoint2D::TPoint2D | ( | const HepVector3D & | ) |
TPoint2D::~TPoint2D | ( | ) | [virtual] |
double TPoint2D::cross | ( | const TPoint2D & | ) | const [inline] |
Definition at line 139 of file TPoint2D.h.
Referenced by TConformalFinder::crossPoints(), TTrackManager::salvageAssociateHits(), and TConformalFinder::trackSide().
double TPoint2D::dot | ( | const TPoint2D & | ) | const [inline] |
double TPoint2D::mag | ( | void | ) | const [inline] |
double TPoint2D::mag2 | ( | void | ) | const [inline] |
Definition at line 118 of file TPoint2D.h.
References _p.
Referenced by TConformalFinder::crossPoints().
TPoint2D TPoint2D::operator- | ( | ) | const [inline] |
double TPoint2D::phi | ( | void | ) | const [inline] |
Definition at line 124 of file TPoint2D.h.
Referenced by TConformalFinder::stereoSegmentsFromBadHits().
00124 { 00125 if (_p[0] == 0.0 && _p[1] == 0.0) return 0.; 00126 double a = atan2(_p[1], _p[0]); 00127 if (a > 0) return a; 00128 return a + 2. * M_PI; 00129 }
TPoint2D TPoint2D::unit | ( | void | ) | const [inline] |
Definition at line 170 of file TPoint2D.h.
References _p, and TPoint2D().
00170 { 00171 double sum2 = _p[0] * _p[0] + _p[1] * _p[1]; 00172 if (sum2 == 0.) return TPoint2D(0., 0.); 00173 double sum = sqrt(sum2); 00174 return TPoint2D(_p[0] / sum, _p[1] / sum); 00175 }
double TPoint2D::x | ( | double | ) | [inline] |
double TPoint2D::x | ( | void | ) | const [inline] |
Definition at line 88 of file TPoint2D.h.
References _p.
Referenced by cross(), TConformalFinder::crossPoints(), TLine2D::distance(), dot(), operator+(), operator-(), operator<<(), and operator==().
00088 { 00089 return _p[0]; 00090 }
double TPoint2D::y | ( | double | ) | [inline] |
double TPoint2D::y | ( | void | ) | const [inline] |
Definition at line 94 of file TPoint2D.h.
References _p.
Referenced by cross(), TConformalFinder::crossPoints(), TLine2D::distance(), dot(), operator+(), operator-(), operator<<(), and operator==().
00094 { 00095 return _p[1]; 00096 }
double TPoint2D::_p[2] [private] |
Definition at line 70 of file TPoint2D.h.
Referenced by cross(), dot(), mag(), mag2(), operator+(), operator-(), operator==(), phi(), TPoint2D(), unit(), x(), and y().