CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 10 of file Point2DBase.h.

Member Typedef Documentation

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

Definition at line 13 of file Point2DBase.h.

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

Definition at line 15 of file Point2DBase.h.

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

Definition at line 16 of file Point2DBase.h.

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

Definition at line 14 of file Point2DBase.h.

Constructor & Destructor Documentation

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 22 of file Point2DBase.h.

22 {}
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 28 of file Point2DBase.h.

28 : BaseClass( p.basicVector()) {}
PV2DBase< T, PointTag, FrameTag > BaseClass
Definition: Point2DBase.h:13
const BasicVectorType & basicVector() const
Definition: PV2DBase.h:38
template<class T, class FrameTag>
Point2DBase< T, FrameTag >::Point2DBase ( const T x,
const T y 
)
inline

construct from cartesian coordinates

Definition at line 31 of file Point2DBase.h.

31 : BaseClass(x, y) {}
PV2DBase< T, PointTag, FrameTag > BaseClass
Definition: Point2DBase.h:13
template<class T, class FrameTag>
Point2DBase< T, FrameTag >::Point2DBase ( const Polar set)
inlineexplicit

construct from polar coordinates

Definition at line 34 of file Point2DBase.h.

34 : BaseClass( set) {}
PV2DBase< T, PointTag, FrameTag > BaseClass
Definition: Point2DBase.h:13
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 41 of file Point2DBase.h.

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

Member Function Documentation

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 47 of file Point2DBase.h.

47  {
48  this->basicVector() += v.basicVector();
49  return *this;
50  }
const BasicVectorType & basicVector() const
Definition: PV2DBase.h:38
template<class T, class FrameTag>
template<class U >
Point2DBase& Point2DBase< T, FrameTag >::operator-= ( const Vector2DBase< U, FrameTag > &  v)
inline

Definition at line 53 of file Point2DBase.h.

53  {
54  this->basicVector() -= v.basicVector();
55  return *this;
56  }
const BasicVectorType & basicVector() const
Definition: PV2DBase.h:38