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
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 namespace CLHEP {
0020
0021 inline HepAxisAngle::HepAxisAngle() :
0022 axis_( Hep3Vector(0,0,1) ), delta_( 0.0 )
0023 {}
0024
0025 inline HepAxisAngle::HepAxisAngle( const Hep3Vector aaxis, Scalar ddelta ) :
0026 axis_( aaxis.unit() ), delta_( ddelta )
0027 {}
0028
0029
0030 inline Hep3Vector HepAxisAngle::getAxis() const {
0031 return axis_;
0032 }
0033
0034 inline Hep3Vector HepAxisAngle::axis() const {
0035 return axis_;
0036 }
0037
0038
0039 inline HepAxisAngle & HepAxisAngle::setAxis( const Hep3Vector aaxis ) {
0040 axis_ = aaxis.unit();
0041 return *this;
0042 }
0043
0044
0045 inline double HepAxisAngle::getDelta() const {
0046 return delta_;
0047 }
0048
0049 inline double HepAxisAngle::delta() const {
0050 return delta_;
0051 }
0052
0053
0054 inline HepAxisAngle & HepAxisAngle::setDelta( Scalar ddelta ) {
0055 delta_ = ddelta;
0056 return *this;
0057 }
0058
0059
0060 inline HepAxisAngle & HepAxisAngle::set( const Hep3Vector aaxis, Scalar ddelta ) {
0061 axis_ = aaxis.unit();
0062 delta_ = ddelta;
0063 return *this;
0064 }
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 }
0076
0077
0078 inline bool HepAxisAngle::operator==( const AA & aa ) const {
0079 return ( compare( aa ) == 0 );
0080 }
0081
0082
0083 inline bool HepAxisAngle::operator!=( const AA & aa ) const {
0084 return ( compare( aa ) != 0 );
0085 }
0086
0087
0088 inline bool HepAxisAngle::operator<( const AA & aa ) const {
0089 return ( compare( aa ) < 0 );
0090 }
0091
0092
0093 inline bool HepAxisAngle::operator<=( const AA & aa ) const {
0094 return ( compare( aa ) <= 0 );
0095 }
0096
0097
0098 inline bool HepAxisAngle::operator>( const AA & aa ) const {
0099 return ( compare( aa ) > 0 );
0100 }
0101
0102
0103 inline bool HepAxisAngle::operator>=( const AA & aa ) const {
0104 return ( compare( aa ) >= 0 );
0105 }
0106
0107
0108 inline double HepAxisAngle::getTolerance() {
0109 return tolerance;
0110 }
0111
0112
0113 inline double HepAxisAngle::setTolerance( Scalar tol ) {
0114 Scalar oldTolerance( tolerance );
0115 tolerance = tol;
0116 return oldTolerance;
0117 }
0118
0119 }