Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:54:39

0001 #ifndef AXISANGLE_ICC
0002 #error "AxisAngle.icc included without AxisAngle.h"
0003 #endif
0004 
0005 
0006 // ----------------------------------------------------------------------
0007 //
0008 // AxisAngle.icc
0009 //
0010 // History:
0011 //   23-Jan-1998  WEB  Initial draft
0012 //   12-Mar-1998  WEB  Gave default constructor proper default values
0013 //   13-Mar-1998  WEB  Corrected setDelta; simplified compare()
0014 //   17-Jun-1998  WEB  Added namespace support
0015 //   26-Jul-2000  MF   CLHEP version
0016 //
0017 // ----------------------------------------------------------------------
0018 
0019 namespace CLHEP {
0020 
0021 inline HepAxisAngle::HepAxisAngle() :
0022   axis_( Hep3Vector(0,0,1) ), delta_( 0.0 )
0023 {}  // HepAxisAngle::HepAxisAngle()
0024 
0025 inline HepAxisAngle::HepAxisAngle( const Hep3Vector aaxis, Scalar ddelta ) :
0026   axis_( aaxis.unit() ), delta_( ddelta )
0027 {}  // HepAxisAngle::HepAxisAngle()
0028 
0029 
0030 inline Hep3Vector HepAxisAngle::getAxis() const {
0031   return  axis_;
0032 }  // HepAxisAngle::getAxis()
0033 
0034 inline Hep3Vector HepAxisAngle::axis() const {
0035   return  axis_;
0036 }  // HepAxisAngle::axis()
0037 
0038 
0039 inline HepAxisAngle & HepAxisAngle::setAxis( const Hep3Vector aaxis ) {
0040   axis_ = aaxis.unit();
0041   return  *this;
0042 }  // HepAxisAngle::setAxis()
0043 
0044 
0045 inline double HepAxisAngle::getDelta() const {
0046   return  delta_;
0047 }  // HepAxisAngle::getDelta()
0048 
0049 inline double HepAxisAngle::delta() const {
0050   return  delta_;
0051 }  // HepAxisAngle::delta()
0052 
0053 
0054 inline HepAxisAngle & HepAxisAngle::setDelta( Scalar ddelta ) {
0055   delta_ = ddelta;
0056   return  *this;
0057 }  // HepAxisAngle::setDelta()
0058 
0059 
0060 inline HepAxisAngle & HepAxisAngle::set( const Hep3Vector aaxis, Scalar ddelta ) {
0061   axis_ = aaxis.unit();
0062   delta_ = ddelta;
0063   return  *this;
0064 }  // HepAxisAngle::set()
0065 
0066 
0067 inline int HepAxisAngle::compare( const AA & aa ) const {
0068 
0069   return  delta_ < aa.delta_  ?  -1
0070        :  delta_ > aa.delta_  ?  +1
0071        :  axis_  < aa.axis_   ?  -1
0072        :  axis_  > aa.axis_   ?  +1
0073        :                          0;
0074 
0075 }  // HepAxisAngle::compare()
0076 
0077 
0078 inline bool HepAxisAngle::operator==( const AA & aa ) const {
0079   return  ( compare( aa ) == 0 );
0080 }  // HepAxisAngle::operator==()
0081 
0082 
0083 inline bool HepAxisAngle::operator!=( const AA & aa ) const {
0084   return  ( compare( aa ) != 0 );
0085 }  // HepAxisAngle::operator!=()
0086 
0087 
0088 inline bool HepAxisAngle::operator<( const AA & aa ) const {
0089   return  ( compare( aa ) < 0 );
0090 }  // HepAxisAngle::operator<()
0091 
0092 
0093 inline bool HepAxisAngle::operator<=( const AA & aa ) const {
0094   return  ( compare( aa ) <= 0 );
0095 }  // HepAxisAngle::operator<=()
0096 
0097 
0098 inline bool HepAxisAngle::operator>( const AA & aa ) const {
0099   return  ( compare( aa ) > 0 );
0100 }  // HepAxisAngle::operator>()
0101 
0102 
0103 inline bool HepAxisAngle::operator>=( const AA & aa ) const {
0104   return  ( compare( aa ) >= 0 );
0105 }  // HepAxisAngle::operator>=()
0106 
0107 
0108 inline double HepAxisAngle::getTolerance() {
0109   return tolerance;
0110 }  // HepAxisAngle::getTolerance()
0111 
0112 
0113 inline double HepAxisAngle::setTolerance( Scalar tol ) {
0114   Scalar oldTolerance( tolerance );
0115   tolerance = tol;
0116   return oldTolerance;
0117 }  // HepAxisAngle::setTolerance()
0118 
0119 }  // namespace CLHEP