CMS 3D CMS Logo

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

#include <Point3DBase.h>

Inheritance diagram for Point3DBase< T, FrameTag >:
PV3DBase< T, PointTag, FrameTag >

Public Types

typedef PV3DBase< T, PointTag, FrameTag > BaseClass
 
typedef BaseClass::BasicVectorType BasicVectorType
 
typedef BaseClass::Cylindrical Cylindrical
 
typedef BaseClass::Polar Polar
 
typedef BaseClass::Spherical Spherical
 
typedef Vector3DBase< T, FrameTag > VectorType
 
- Public Types inherited from PV3DBase< T, PointTag, FrameTag >
typedef Basic3DVector< TBasicVectorType
 
typedef BasicVectorType::Cylindrical Cylindrical
 
typedef BasicVectorType::MathVector MathVector
 
typedef BasicVectorType::Polar Polar
 
typedef T ScalarType
 
typedef BasicVectorType::Spherical Spherical
 

Public Member Functions

template<class U >
Point3DBaseoperator+= (const Vector3DBase< U, FrameTag > &v)
 
template<class U >
Point3DBaseoperator-= (const Vector3DBase< U, FrameTag > &v)
 
bool operator== (const Point3DBase &rh) const
 
 Point3DBase ()
 
template<class U >
 Point3DBase (const Point3DBase< U, FrameTag > &p)
 
 Point3DBase (const T &x, const T &y, const T &z)
 construct from cartesian coordinates More...
 
 Point3DBase (const Cylindrical &set)
 
 Point3DBase (const Polar &set)
 construct from polar coordinates More...
 
 Point3DBase (const Geom::Theta< T > &th, const Geom::Phi< T > &ph, const T &r)
 
 Point3DBase (const T &x, const T &y)
 
 Point3DBase (Point2DBase< T, FrameTag > p)
 
template<class U >
 Point3DBase (const Basic3DVector< U > &v)
 
- Public Member Functions inherited from PV3DBase< T, PointTag, FrameTag >
T barePhi () const
 
T bareTheta () const
 
const BasicVectorTypebasicVector () const
 
T eta () const
 
T mag () const
 
T mag2 () const
 
MathVector const & mathVector () const
 
MathVectormathVector ()
 
T perp () const
 
T perp2 () const
 
Geom::Phi< Tphi () const
 
 PV3DBase ()
 
 PV3DBase (const T &x, const T &y, const T &z)
 construct from cartesian coordinates More...
 
 PV3DBase (const Cylindrical &set)
 
 PV3DBase (const Polar &set)
 construct from polar coordinates More...
 
 PV3DBase (const Geom::Theta< T > &th, const Geom::Phi< T > &ph, const T &r)
 
 PV3DBase (const Basic3DVector< U > &v)
 
Geom::Theta< Ttheta () const
 
T transverse () const
 
T x () const
 
T y () const
 
T z () const
 

Additional Inherited Members

- Protected Attributes inherited from PV3DBase< T, PointTag, FrameTag >
BasicVectorType theVector
 

Detailed Description

template<class T, class FrameTag>
class Point3DBase< T, FrameTag >

Definition at line 11 of file Point3DBase.h.

Member Typedef Documentation

template<class T, class FrameTag>
typedef PV3DBase< T, PointTag, FrameTag> Point3DBase< T, FrameTag >::BaseClass

Definition at line 14 of file Point3DBase.h.

template<class T, class FrameTag>
typedef BaseClass::BasicVectorType Point3DBase< T, FrameTag >::BasicVectorType

Definition at line 19 of file Point3DBase.h.

template<class T, class FrameTag>
typedef BaseClass::Cylindrical Point3DBase< T, FrameTag >::Cylindrical

Definition at line 16 of file Point3DBase.h.

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

Definition at line 18 of file Point3DBase.h.

template<class T, class FrameTag>
typedef BaseClass::Spherical Point3DBase< T, FrameTag >::Spherical

Definition at line 17 of file Point3DBase.h.

template<class T, class FrameTag>
typedef Vector3DBase< T, FrameTag> Point3DBase< T, FrameTag >::VectorType

Definition at line 15 of file Point3DBase.h.

Constructor & Destructor Documentation

template<class T, class FrameTag>
Point3DBase< T, FrameTag >::Point3DBase ( )
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 25 of file Point3DBase.h.

25 {}
template<class T, class FrameTag>
template<class U >
Point3DBase< T, FrameTag >::Point3DBase ( const Point3DBase< U, FrameTag > &  p)
inline

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

Definition at line 31 of file Point3DBase.h.

31 : BaseClass( p.basicVector()) {}
PV3DBase< T, PointTag, FrameTag > BaseClass
Definition: Point3DBase.h:14
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
template<class T, class FrameTag>
Point3DBase< T, FrameTag >::Point3DBase ( const T x,
const T y,
const T z 
)
inline

construct from cartesian coordinates

Definition at line 34 of file Point3DBase.h.

34 : BaseClass(x, y, z) {}
PV3DBase< T, PointTag, FrameTag > BaseClass
Definition: Point3DBase.h:14
template<class T, class FrameTag>
Point3DBase< T, FrameTag >::Point3DBase ( const Cylindrical set)
inlineexplicit

Construct from cylindrical coordinates.

Definition at line 38 of file Point3DBase.h.

38 : BaseClass( set) {}
PV3DBase< T, PointTag, FrameTag > BaseClass
Definition: Point3DBase.h:14
template<class T, class FrameTag>
Point3DBase< T, FrameTag >::Point3DBase ( const Polar set)
inlineexplicit

construct from polar coordinates

Definition at line 41 of file Point3DBase.h.

41 : BaseClass( set) {}
PV3DBase< T, PointTag, FrameTag > BaseClass
Definition: Point3DBase.h:14
template<class T, class FrameTag>
Point3DBase< T, FrameTag >::Point3DBase ( const Geom::Theta< T > &  th,
const Geom::Phi< T > &  ph,
const T r 
)
inline

Deprecated construct from polar coordinates, use constructor from Polar( theta, phi, r) instead.

Definition at line 46 of file Point3DBase.h.

47  : BaseClass(th,ph,r) {}
PV3DBase< T, PointTag, FrameTag > BaseClass
Definition: Point3DBase.h:14
template<class T, class FrameTag>
Point3DBase< T, FrameTag >::Point3DBase ( const T x,
const T y 
)
inline

Mimick 2D point. This constructor is convenient for points on a plane, since the z component for them is zero.

Definition at line 52 of file Point3DBase.h.

52 : BaseClass( x, y, 0) {}
PV3DBase< T, PointTag, FrameTag > BaseClass
Definition: Point3DBase.h:14
template<class T, class FrameTag>
Point3DBase< T, FrameTag >::Point3DBase ( Point2DBase< T, FrameTag >  p)
inlineexplicit

Definition at line 53 of file Point3DBase.h.

53  :
54  BaseClass( p.x(), p.y(), 0) {}
PV3DBase< T, PointTag, FrameTag > BaseClass
Definition: Point3DBase.h:14
template<class T, class FrameTag>
template<class U >
Point3DBase< T, FrameTag >::Point3DBase ( const Basic3DVector< 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 61 of file Point3DBase.h.

61 : BaseClass(v) {}
PV3DBase< T, PointTag, FrameTag > BaseClass
Definition: Point3DBase.h:14

Member Function Documentation

template<class T, class FrameTag>
template<class U >
Point3DBase& Point3DBase< T, FrameTag >::operator+= ( const Vector3DBase< 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 72 of file Point3DBase.h.

72  {
73  this->theVector += v.basicVector();
74  return *this;
75  }
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
template<class T, class FrameTag>
template<class U >
Point3DBase& Point3DBase< T, FrameTag >::operator-= ( const Vector3DBase< U, FrameTag > &  v)
inline

Definition at line 78 of file Point3DBase.h.

78  {
79  this->theVector -= v.basicVector();
80  return *this;
81  }
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
template<class T, class FrameTag>
bool Point3DBase< T, FrameTag >::operator== ( const Point3DBase< T, FrameTag > &  rh) const
inline

Definition at line 64 of file Point3DBase.h.

64  {
65  return this->basicVector()==rh.basicVector();
66  }
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56