AxisAngle.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 // ----------------------------------------------------------------------
00009 //
00010 // AxisAngle.icc
00011 //
00012 // History:
00013 //   23-Jan-1998  WEB  Initial draft
00014 //   12-Mar-1998  WEB  Gave default constructor proper default values
00015 //   13-Mar-1998  WEB  Corrected setDelta; simplified compare()
00016 //   17-Jun-1998  WEB  Added namespace support
00017 //   26-Jul-2000  MF   CLHEP version
00018 //
00019 // ----------------------------------------------------------------------
00020 
00021 namespace CLHEP {
00022 
00023 inline HepAxisAngle::HepAxisAngle() :
00024   axis_( Hep3Vector(0,0,1) ), delta_( 0.0 )
00025 {}  // HepAxisAngle::HepAxisAngle()
00026 
00027 inline HepAxisAngle::HepAxisAngle( const Hep3Vector aaxis, Scalar ddelta ) :
00028   axis_( aaxis.unit() ), delta_( ddelta )
00029 {}  // HepAxisAngle::HepAxisAngle()
00030 
00031 
00032 inline Hep3Vector HepAxisAngle::getAxis() const {
00033   return  axis_;
00034 }  // HepAxisAngle::getAxis()
00035 
00036 inline Hep3Vector HepAxisAngle::axis() const {
00037   return  axis_;
00038 }  // HepAxisAngle::axis()
00039 
00040 
00041 inline HepAxisAngle & HepAxisAngle::setAxis( const Hep3Vector aaxis ) {
00042   axis_ = aaxis.unit();
00043   return  *this;
00044 }  // HepAxisAngle::setAxis()
00045 
00046 
00047 inline double HepAxisAngle::getDelta() const {
00048   return  delta_;
00049 }  // HepAxisAngle::getDelta()
00050 
00051 inline double HepAxisAngle::delta() const {
00052   return  delta_;
00053 }  // HepAxisAngle::delta()
00054 
00055 
00056 inline HepAxisAngle & HepAxisAngle::setDelta( Scalar ddelta ) {
00057   delta_ = ddelta;
00058   return  *this;
00059 }  // HepAxisAngle::setDelta()
00060 
00061 
00062 inline HepAxisAngle & HepAxisAngle::set( const Hep3Vector aaxis, Scalar ddelta ) {
00063   axis_ = aaxis.unit();
00064   delta_ = ddelta;
00065   return  *this;
00066 }  // HepAxisAngle::set()
00067 
00068 
00069 inline int HepAxisAngle::compare( const AA & aa ) const {
00070 
00071   return  delta_ < aa.delta_  ?  -1
00072        :  delta_ > aa.delta_  ?  +1
00073        :  axis_  < aa.axis_   ?  -1
00074        :  axis_  > aa.axis_   ?  +1
00075        :                          0;
00076 
00077 }  // HepAxisAngle::compare()
00078 
00079 
00080 inline bool HepAxisAngle::operator==( const AA & aa ) const {
00081   return  ( compare( aa ) == 0 );
00082 }  // HepAxisAngle::operator==()
00083 
00084 
00085 inline bool HepAxisAngle::operator!=( const AA & aa ) const {
00086   return  ( compare( aa ) != 0 );
00087 }  // HepAxisAngle::operator!=()
00088 
00089 
00090 inline bool HepAxisAngle::operator<( const AA & aa ) const {
00091   return  ( compare( aa ) < 0 );
00092 }  // HepAxisAngle::operator<()
00093 
00094 
00095 inline bool HepAxisAngle::operator<=( const AA & aa ) const {
00096   return  ( compare( aa ) <= 0 );
00097 }  // HepAxisAngle::operator<=()
00098 
00099 
00100 inline bool HepAxisAngle::operator>( const AA & aa ) const {
00101   return  ( compare( aa ) > 0 );
00102 }  // HepAxisAngle::operator>()
00103 
00104 
00105 inline bool HepAxisAngle::operator>=( const AA & aa ) const {
00106   return  ( compare( aa ) >= 0 );
00107 }  // HepAxisAngle::operator>=()
00108 
00109 
00110 inline double HepAxisAngle::getTolerance() {
00111   return tolerance;
00112 }  // HepAxisAngle::getTolerance()
00113 
00114 
00115 inline double HepAxisAngle::setTolerance( Scalar tol ) {
00116   Scalar oldTolerance( tolerance );
00117   tolerance = tol;
00118   return oldTolerance;
00119 }  // HepAxisAngle::setTolerance()
00120 
00121 }  // namespace CLHEP

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