EulerAngles.icc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // ---------------------------------------------------------------------------
00003 //
00004 // This file is a part of the CLHEP - a Class Library for High Energy Physics.
00005 // 
00006 // ----------------------------------------------------------------------
00007 //
00008 // EulerAngles.icc - Inline methods for EulerAngles class.
00009 //
00010 // History:
00011 //    9-Apr-1997  MF    Split off from original angles.hh.  Content-free.
00012 //   26-Jan-1998  WEB   Fleshed out.
00013 //   12-Mar-1998  WEB   Gave default constructor proper default values
00014 //   13-Mar-1998  WEB   Simplified compare()
00015 //   17-Jun-1998  WEB   Added namespace support
00016 //   27-Jul-2000  MF    CLHEP version
00017 //
00018 // ----------------------------------------------------------------------
00019 
00020 namespace CLHEP  {
00021 
00022 inline HepEulerAngles::HepEulerAngles()
00023 : phi_( 0.0 ), theta_( 0.0 ), psi_( 0.0 )
00024 {}  // HepEulerAngles::HepEulerAngles()
00025 
00026 inline HepEulerAngles::HepEulerAngles ( 
00027                                 double phi1, double theta1, double psi1 )
00028                                 : phi_( phi1 ), theta_( theta1 ), psi_( psi1 )
00029 {}  // HepEulerAngles::HepEulerAngles()
00030 
00031 inline double HepEulerAngles::getPhi() const {
00032   return  phi_;
00033 }  // HepEulerAngles::getPhi()
00034 
00035 inline double HepEulerAngles::phi() const {
00036   return  phi_;
00037 }  // HepEulerAngles::phi()
00038 
00039 inline HepEulerAngles & HepEulerAngles::setPhi( double phi1 ) {
00040   phi_ = phi1;
00041   return  *this;
00042 }  // HepEulerAngles::setPhi()
00043 
00044 inline double HepEulerAngles::getTheta() const {
00045   return  theta_;
00046 }  // HepEulerAngles::getTheta()
00047 
00048 inline double HepEulerAngles::theta() const {
00049   return  theta_;
00050 }  // HepEulerAngles::theta()
00051 
00052 inline HepEulerAngles & HepEulerAngles::setTheta( double theta1 ) {
00053   theta_ = theta1;
00054   return  *this;
00055 }  // HepEulerAngles::setTheta()
00056 
00057 inline double HepEulerAngles::getPsi() const {
00058   return  psi_;
00059 }  // HepEulerAngles::getPsi()
00060 
00061 inline double HepEulerAngles::psi() const {
00062   return  psi_;
00063 }  // HepEulerAngles::psi()
00064 
00065 inline HepEulerAngles & HepEulerAngles::setPsi( double psi1 ) {
00066   psi_ = psi1;
00067   return  *this;
00068 }  // HepEulerAngles::setPsi()
00069 
00070 inline HepEulerAngles & 
00071         HepEulerAngles::set( double phi1, double theta1, double psi1 ) {
00072   phi_ = phi1, theta_ = theta1, psi_ = psi1;
00073   return *this;
00074 }  // HepEulerAngles::set()
00075 
00076 
00077 inline int HepEulerAngles::compare( const HepEulerAngles & ea ) const {
00078 
00079   return  phi_   < ea.phi_    ?  -1
00080        :  phi_   > ea.phi_    ?  +1
00081        :  theta_ < ea.theta_  ?  -1
00082        :  theta_ > ea.theta_  ?  +1
00083        :  psi_   < ea.psi_    ?  -1
00084        :  psi_   > ea.psi_    ?  +1
00085        :                          0;
00086 
00087 }  // HepEulerAngles::compare()
00088 
00089 
00090 inline bool HepEulerAngles::operator==( const HepEulerAngles & ea ) const {
00091   return  ( compare( ea ) == 0 );
00092 }  // HepEulerAngles::operator==()
00093 
00094 inline bool HepEulerAngles::operator!=( const HepEulerAngles & ea ) const {
00095   return  ( compare( ea ) != 0 );
00096 }  // HepEulerAngles::operator!=()
00097 
00098 inline bool HepEulerAngles::operator<( const HepEulerAngles & ea ) const {
00099   return  ( compare( ea ) < 0 );
00100 }  // HepEulerAngles::operator<()
00101 
00102 inline bool HepEulerAngles::operator<=( const HepEulerAngles & ea ) const {
00103   return  ( compare( ea ) <= 0 );
00104 }  // HepEulerAngles::operator<=()
00105 
00106 inline bool HepEulerAngles::operator>( const HepEulerAngles & ea ) const {
00107   return  ( compare( ea ) > 0 );
00108 }  // HepEulerAngles::operator>()
00109 
00110 inline bool HepEulerAngles::operator>=( const HepEulerAngles & ea ) const {
00111   return  ( compare( ea ) >= 0 );
00112 }  // HepEulerAngles::operator>=()
00113 
00114 inline double HepEulerAngles::getTolerance() {
00115   return  tolerance;
00116 }  // HepEulerAngles::getTolerance()
00117 
00118 inline double HepEulerAngles::setTolerance( double tol ) {
00119   double oldTolerance( tolerance );
00120   tolerance = tol;
00121   return  oldTolerance;
00122 }  // HepEulerAngles::setTolerance()
00123 
00124 }  // namespace CLHEP

Generated on Mon May 27 17:47:34 2013 for Geant4 by  doxygen 1.4.7