CLHEP/Vector/AxisAngle.h

#ifndef HEP_AXISANGLE_H
#define HEP_AXISANGLE_H

// ----------------------------------------------------------------------
//
// AxisAngle.h - provide HepAxisAngle class
//
// History:
//   23-Jan-1998  WEB  Initial draft
//   15-Jun-1998  WEB  Added namespace support
//   02-May-2000  WEB  No global using
//   27-Jul-2000  MF   CLHEP version
//
// ----------------------------------------------------------------------


#ifndef HEP_THREEVECTOR_H
  #include "CLHEP/Vector/ThreeVector.h"
#endif

// Declarations of classes and global methods
class HepAxisAngle;
HepStd::ostream & operator<<( HepStd::ostream & os, const HepAxisAngle & aa );
HepStd::istream & operator>>( HepStd::istream & is,       HepAxisAngle & aa );

class HepAxisAngle {

public:
  typedef HepDouble Scalar;

protected:
  typedef HepAxisAngle AA;         // just an abbreviation
  static Scalar tolerance;      // to determine relative nearness

public:

  // ----------  Constructors:
  inline HepAxisAngle();
  inline HepAxisAngle( const Hep3Vector axis, Scalar delta );

  // ----------  Destructor, copy constructor, assignment:
  // use C++ defaults

  // ----------  Accessors:

public:
  inline Hep3Vector            getAxis() const;
  inline Hep3Vector            axis() const;
  inline AA &                  setAxis( const Hep3Vector axis );

  inline HepDouble             getDelta() const;
  inline HepDouble             delta() const ;
  inline AA &                  setDelta( Scalar delta );

  inline AA & set( const Hep3Vector axis, Scalar delta );

  // ----------  Operations:

  //   comparisons:
  inline int  compare   ( const AA & aa ) const;

  inline HepBoolean operator==( const AA & aa ) const;
  inline HepBoolean operator!=( const AA & aa ) const;
  inline HepBoolean operator< ( const AA & aa ) const;
  inline HepBoolean operator<=( const AA & aa ) const;
  inline HepBoolean operator> ( const AA & aa ) const;
  inline HepBoolean operator>=( const AA & aa ) const;

  //   relative comparison:
  inline static HepDouble getTolerance();
  inline static HepDouble setTolerance( Scalar tol );

protected:
    HepDouble distance( const HepAxisAngle & aa ) const;
public:

  HepBoolean isNear ( const AA & aa, Scalar epsilon = tolerance ) const;
  HepDouble  howNear( const AA & aa ) const;

  // ----------  I/O:

  friend HepStd::ostream & operator<<( HepStd::ostream & os, const AA & aa );
  friend HepStd::istream & operator>>( HepStd::istream & is,       AA & aa );

private:
  Hep3Vector axis_;  // Note:  After construction, this is always of mag 1
  HepDouble  delta_;

};  // HepAxisAngle

HEP_BEGIN_NAMESPACE( zmpv )	/*  namespace zmpv  {  */

  typedef HepAxisAngle AxisAngle;

HEP_END_NAMESPACE( zmpv )	/*  }  // namespace zmpv  */


#define AXISANGLE_ICC
#include "CLHEP/Vector/AxisAngle.icc"
#undef AXISANGLE_ICC

#endif  // HEP_AXISANGLE_H

Generated by GNU enscript 1.6.1.