CMS 3D CMS Logo

Public Types | Public Member Functions

Point2DBase< T, FrameTag > Class Template Reference

#include <Point2DBase.h>

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

List of all members.

Public Types

typedef PV2DBase< T, PointTag,
FrameTag > 
BaseClass
typedef Basic2DVector< T > BasicVectorType
typedef BaseClass::Polar Polar
typedef Vector2DBase< T, FrameTag > VectorType

Public Member Functions

template<class U >
Point2DBaseoperator+= (const Vector2DBase< U, FrameTag > &v)
template<class U >
Point2DBaseoperator-= (const Vector2DBase< U, FrameTag > &v)
 Point2DBase (const T &x, const T &y)
 construct from cartesian coordinates
template<class U >
 Point2DBase (const Basic2DVector< U > &v)
 Point2DBase (const Polar &set)
 construct from polar coordinates
 Point2DBase ()
template<class U >
 Point2DBase (const Point2DBase< U, FrameTag > &p)

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

Reimplemented from PV2DBase< T, PointTag, FrameTag >.

Definition at line 15 of file Point2DBase.h.

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

Reimplemented from PV2DBase< T, PointTag, FrameTag >.

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.

{}
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.

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.

: BaseClass(x, y) {}
template<class T, class FrameTag>
Point2DBase< T, FrameTag >::Point2DBase ( const Polar set) [inline, explicit]

construct from polar coordinates

Definition at line 34 of file Point2DBase.h.

: BaseClass( set) {}
template<class T, class FrameTag>
template<class U >
Point2DBase< T, FrameTag >::Point2DBase ( const Basic2DVector< U > &  v) [inline, explicit]

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.

: BaseClass(v) {}

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.

                                                                {
    this->basicVector() += v.basicVector();
    return *this;
  } 
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.

                                                                {
    this->basicVector() -= v.basicVector();
    return *this;
  }