CMS 3D CMS Logo

Public Member Functions | Private Attributes

Geom::Polar2Cartesian< T > Class Template Reference

#include <CoordinateSets.h>

List of all members.

Public Member Functions

const Tphi () const
 Polar2Cartesian (const T &r, const T &phi)
 Construct from radius and polar angle.
const Tr () const
T x () const
T y () const

Private Attributes

T phi_
T r_

Detailed Description

template<typename T>
class Geom::Polar2Cartesian< T >

Converts polar 2D coordinates to cartesian coordinates. Note: Spherical coordinates (also sometimes called Polar 3D coordinates) are handled by class Spherical2Cartesian

Definition at line 14 of file CoordinateSets.h.


Constructor & Destructor Documentation

template<typename T >
Geom::Polar2Cartesian< T >::Polar2Cartesian ( const T r,
const T phi 
) [inline]

Construct from radius and polar angle.

Definition at line 17 of file CoordinateSets.h.

                                                   :
            r_(r), phi_(phi) {}

Member Function Documentation

template<typename T >
const T& Geom::Polar2Cartesian< T >::phi ( ) const [inline]

Definition at line 21 of file CoordinateSets.h.

References Geom::Polar2Cartesian< T >::phi_.

{return phi_;}
template<typename T >
const T& Geom::Polar2Cartesian< T >::r ( ) const [inline]

Definition at line 20 of file CoordinateSets.h.

References Geom::Polar2Cartesian< T >::r_.

{return r_;}
template<typename T >
T Geom::Polar2Cartesian< T >::x ( ) const [inline]

Definition at line 23 of file CoordinateSets.h.

References funct::cos(), Geom::Polar2Cartesian< T >::phi_, and Geom::Polar2Cartesian< T >::r_.

{return r_ * cos(phi_);}
template<typename T >
T Geom::Polar2Cartesian< T >::y ( ) const [inline]

Definition at line 24 of file CoordinateSets.h.

References Geom::Polar2Cartesian< T >::phi_, Geom::Polar2Cartesian< T >::r_, and funct::sin().

{return r_ * sin(phi_);}

Member Data Documentation

template<typename T >
T Geom::Polar2Cartesian< T >::phi_ [private]
template<typename T >
T Geom::Polar2Cartesian< T >::r_ [private]