CMS 3D CMS Logo

Public Member Functions | Private Attributes

LineXY Class Reference

#include <RoadSearchCircleSeed.h>

List of all members.

Public Member Functions

 LineXY (GlobalPoint point1, GlobalPoint point2)
double Phi () const
 ~LineXY ()

Private Attributes

double theX_
double theY_

Detailed Description

Definition at line 136 of file RoadSearchCircleSeed.h.


Constructor & Destructor Documentation

LineXY::LineXY ( GlobalPoint  point1,
GlobalPoint  point2 
)

Definition at line 470 of file RoadSearchCircleSeed.cc.

References PV3DBase< T, PVType, FrameType >::perp(), theX_, theY_, PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

{
  theX_ = std::fabs(point1.x()-point2.x()); 
  theY_ = std::fabs(point1.y()-point2.y());
  //If the line is pointing backwards in x
  if ((point1.perp() >= point2.perp() &&
       point1.x() < point2.x()) ||
      (point2.perp() >= point1.perp() &&
       point2.x() < point1.x()))
  {
    theX_ = -1.*theX_;
  }
  //If the line is pointing backwards in y
  if ((point1.perp() >= point2.perp() &&
       point1.y() < point2.y()) ||
      (point2.perp() >= point1.perp() &&
       point2.y() < point1.y()))
  {
    theY_ = -1.*theY_;
  }
}
LineXY::~LineXY ( )

Definition at line 495 of file RoadSearchCircleSeed.cc.

{ }

Member Function Documentation

double LineXY::Phi ( ) const [inline]

Definition at line 141 of file RoadSearchCircleSeed.h.

References theX_, and theY_.

{ return atan2(theY_,theX_); }

Member Data Documentation

double LineXY::theX_ [private]

Definition at line 144 of file RoadSearchCircleSeed.h.

Referenced by LineXY(), and Phi().

double LineXY::theY_ [private]

Definition at line 145 of file RoadSearchCircleSeed.h.

Referenced by LineXY(), and Phi().