CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions
Point2DBase< T, FrameTag > Class Template Reference

#include <Point2DBase.h>

Inheritance diagram for Point2DBase< T, FrameTag >:
PV2DBase< T, PointTag, FrameTag >

Public Types

typedef PV2DBase< T, PointTag, FrameTag > BaseClass
 
typedef Basic2DVector< TBasicVectorType
 
typedef BaseClass::Polar Polar
 
typedef Vector2DBase< T, FrameTag > VectorType
 
- Public Types inherited from PV2DBase< T, PointTag, FrameTag >
typedef Basic2DVector< TBasicVectorType
 
typedef BasicVectorType::MathVector MathVector
 
typedef BasicVectorType::Polar Polar
 
typedef T ScalarType
 

Public Member Functions

template<class U >
Point2DBaseoperator+= (const Vector2DBase< U, FrameTag > &v)
 
template<class U >
Point2DBaseoperator-= (const Vector2DBase< U, FrameTag > &v)
 
 Point2DBase ()
 
template<class U >
 Point2DBase (const Point2DBase< U, FrameTag > &p)
 
 Point2DBase (const T &x, const T &y)
 construct from cartesian coordinates More...
 
 Point2DBase (const Polar &set)
 construct from polar coordinates More...
 
template<class U >
 Point2DBase (const Basic2DVector< U > &v)
 
- Public Member Functions inherited from PV2DBase< T, PointTag, FrameTag >
T barePhi () const
 
const BasicVectorTypebasicVector () const
 
T mag () const
 
T mag2 () const
 
MathVector const & mathVector () const
 
MathVectormathVector ()
 
Geom::Phi< Tphi () const
 
 PV2DBase ()
 
 PV2DBase (const T &x, const T &y)
 construct from cartesian coordinates More...
 
 PV2DBase (const Polar &set)
 construct from polar coordinates More...
 
 PV2DBase (const Basic2DVector< U > &v)
 
T r () const
 
T x () const
 
T y () const
 

Additional Inherited Members

- Protected Member Functions inherited from PV2DBase< T, PointTag, FrameTag >
BasicVectorTypebasicVector ()
 
- Protected Attributes inherited from PV2DBase< T, PointTag, FrameTag >
BasicVectorType theVector
 

Detailed Description

template<class T, class FrameTag>
class Point2DBase< T, FrameTag >

Definition at line 9 of file Point2DBase.h.

Member Typedef Documentation

◆ BaseClass

template<class T, class FrameTag>
typedef PV2DBase<T, PointTag, FrameTag> Point2DBase< T, FrameTag >::BaseClass

Definition at line 11 of file Point2DBase.h.

◆ BasicVectorType

template<class T, class FrameTag>
typedef Basic2DVector<T> Point2DBase< T, FrameTag >::BasicVectorType

Definition at line 13 of file Point2DBase.h.

◆ Polar

template<class T, class FrameTag>
typedef BaseClass::Polar Point2DBase< T, FrameTag >::Polar

Definition at line 14 of file Point2DBase.h.

◆ VectorType

template<class T, class FrameTag>
typedef Vector2DBase<T, FrameTag> Point2DBase< T, FrameTag >::VectorType

Definition at line 12 of file Point2DBase.h.

Constructor & Destructor Documentation

◆ Point2DBase() [1/5]

template<class T, class FrameTag>
Point2DBase< T, FrameTag >::Point2DBase ( )
inline

default constructor uses default constructor of T to initialize the components. For built-in floating-point types this means initialization to zero

Definition at line 20 of file Point2DBase.h.

20 {}

◆ Point2DBase() [2/5]

template<class T, class FrameTag>
template<class U >
Point2DBase< T, FrameTag >::Point2DBase ( const Point2DBase< U, FrameTag > &  p)
inline

Construct from another point in the same reference frame, possiblly with different precision

Definition at line 26 of file Point2DBase.h.

26 : BaseClass(p.basicVector()) {}
PV2DBase< T, PointTag, FrameTag > BaseClass
Definition: Point2DBase.h:11

◆ Point2DBase() [3/5]

template<class T, class FrameTag>
Point2DBase< T, FrameTag >::Point2DBase ( const T x,
const T y 
)
inline

construct from cartesian coordinates

Definition at line 29 of file Point2DBase.h.

29 : BaseClass(x, y) {}
PV2DBase< T, PointTag, FrameTag > BaseClass
Definition: Point2DBase.h:11

◆ Point2DBase() [4/5]

template<class T, class FrameTag>
Point2DBase< T, FrameTag >::Point2DBase ( const Polar set)
inlineexplicit

construct from polar coordinates

Definition at line 32 of file Point2DBase.h.

32 : BaseClass(set) {}
PV2DBase< T, PointTag, FrameTag > BaseClass
Definition: Point2DBase.h:11

◆ Point2DBase() [5/5]

template<class T, class FrameTag>
template<class U >
Point2DBase< T, FrameTag >::Point2DBase ( const Basic2DVector< U > &  v)
inlineexplicit

Explicit constructor from BasicVectorType, bypasses consistency checks for point/vector and for coordinate frame. To be used as carefully as e.g. const_cast.

Definition at line 39 of file Point2DBase.h.

39 : BaseClass(v) {}
PV2DBase< T, PointTag, FrameTag > BaseClass
Definition: Point2DBase.h:11

Member Function Documentation

◆ operator+=()

template<class T, class FrameTag>
template<class U >
Point2DBase& Point2DBase< T, FrameTag >::operator+= ( const Vector2DBase< U, FrameTag > &  v)
inline

A Point can be shifted by a Vector of possibly different precision, defined in the same coordinate frame

Definition at line 45 of file Point2DBase.h.

45  {
46  this->basicVector() += v.basicVector();
47  return *this;
48  }
const BasicVectorType & basicVector() const
Definition: PV2DBase.h:37

◆ operator-=()

template<class T, class FrameTag>
template<class U >
Point2DBase& Point2DBase< T, FrameTag >::operator-= ( const Vector2DBase< U, FrameTag > &  v)
inline

Definition at line 51 of file Point2DBase.h.

51  {
52  this->basicVector() -= v.basicVector();
53  return *this;
54  }
const BasicVectorType & basicVector() const
Definition: PV2DBase.h:37