CMS 3D CMS Logo

Point2DBase.h File Reference

#include "DataFormats/GeometryVector/interface/PointTag.h"
#include "DataFormats/GeometryVector/interface/PV2DBase.h"
#include "DataFormats/GeometryVector/interface/Vector2DBase.h"

Go to the source code of this file.

Classes

class  Point2DBase< T, FrameTag >

Functions

template<typename T, typename U, class Frame>
Point2DBase< typename
PreciseFloatType< T, U >::Type,
Frame > 
operator+ (const Vector2DBase< T, Frame > &p, const Point2DBase< U, Frame > &v)
 Same as operator+(Point,Vector) (see above).
template<typename T, typename U, class Frame>
Point2DBase< typename
PreciseFloatType< T, U >::Type,
Frame > 
operator+ (const Point2DBase< T, Frame > &p, const Vector2DBase< U, Frame > &v)
 The sum of a Point and a Vector is a Point.
template<typename T, typename U, class Frame>
Vector2DBase< typename
PreciseFloatType< T, U >::Type,
Frame > 
operator- (const Point2DBase< T, Frame > &p1, const Point2DBase< U, Frame > &p2)
 The difference of two points is a vector.


Function Documentation

template<typename T, typename U, class Frame>
Point2DBase< typename PreciseFloatType<T,U>::Type, Frame> operator+ ( const Vector2DBase< T, Frame > &  p,
const Point2DBase< U, Frame > &  v 
) [inline]

Same as operator+(Point,Vector) (see above).

Definition at line 75 of file Point2DBase.h.

References PV2DBase< T, PointTag, FrameTag >::basicVector(), and PV2DBase< T, VectorTag, FrameTag >::basicVector().

00075                                                                           {
00076   typedef Point2DBase< typename PreciseFloatType<T,U>::Type, Frame> RT;
00077   return RT( p.basicVector() + v.basicVector());
00078 }

template<typename T, typename U, class Frame>
Point2DBase< typename PreciseFloatType<T,U>::Type, Frame> operator+ ( const Point2DBase< T, Frame > &  p,
const Vector2DBase< U, Frame > &  v 
) [inline]

The sum of a Point and a Vector is a Point.

The arguments must be defined in the same reference frame. The resulting point has the higher precision of the precisions of the two arguments.

Definition at line 66 of file Point2DBase.h.

References PV2DBase< T, VectorTag, FrameTag >::basicVector(), and PV2DBase< T, PointTag, FrameTag >::basicVector().

00066                                                                           {
00067   typedef Point2DBase< typename PreciseFloatType<T,U>::Type, Frame> RT;
00068   return RT( p.basicVector() + v.basicVector());
00069 }

template<typename T, typename U, class Frame>
Vector2DBase< typename PreciseFloatType<T,U>::Type, Frame> operator- ( const Point2DBase< T, Frame > &  p1,
const Point2DBase< U, Frame > &  p2 
) [inline]

The difference of two points is a vector.

The arguments must be defined in the same reference frame. The resulting vector has the higher precision of the precisions of the two arguments.

Definition at line 86 of file Point2DBase.h.

References PV2DBase< T, PointTag, FrameTag >::basicVector().

00086                                                                            {
00087   typedef Vector2DBase< typename PreciseFloatType<T,U>::Type, Frame> RT;
00088   return RT( p1.basicVector() - p2.basicVector());
00089 }


Generated on Tue Jun 9 17:52:06 2009 for CMSSW by  doxygen 1.5.4