CMS 3D CMS Logo

Public Types | Public Member Functions

Point3DBase< T, FrameTag > Class Template Reference

#include <Point3DBase.h>

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

List of all members.

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 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 (const Polar &set)
 construct from polar coordinates
template<class U >
 Point3DBase (const Basic3DVector< U > &v)
 Point3DBase (Point2DBase< T, FrameTag > p)
 Point3DBase (const T &x, const T &y)
 Point3DBase (const T &x, const T &y, const T &z)
 construct from cartesian coordinates
 Point3DBase ()
 Point3DBase (const Cylindrical &set)
 Point3DBase (const Geom::Theta< T > &th, const Geom::Phi< T > &ph, const T &r)
template<class U >
 Point3DBase (const Point3DBase< U, FrameTag > &p)

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

Reimplemented from PV3DBase< T, PointTag, FrameTag >.

Definition at line 19 of file Point3DBase.h.

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

Reimplemented from PV3DBase< T, PointTag, FrameTag >.

Definition at line 16 of file Point3DBase.h.

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

Reimplemented from PV3DBase< T, PointTag, FrameTag >.

Definition at line 18 of file Point3DBase.h.

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

Reimplemented from PV3DBase< T, PointTag, FrameTag >.

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.

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

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.

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

Construct from cylindrical coordinates.

Definition at line 38 of file Point3DBase.h.

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

construct from polar coordinates

Definition at line 41 of file Point3DBase.h.

: BaseClass( set) {}
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.

                                                : BaseClass(th,ph,r) {}
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.

: BaseClass( x, y, 0) {}
template<class T, class FrameTag>
Point3DBase< T, FrameTag >::Point3DBase ( Point2DBase< T, FrameTag >  p) [inline, explicit]

Definition at line 53 of file Point3DBase.h.

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

: BaseClass(v) {}

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.

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

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

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