Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:10:09

0001 // @(#)root/mathcore:$Id$
0002 // Authors: W. Brown, M. Fischler, L. Moneta    2005
0003 
0004  /**********************************************************************
0005   *                                                                    *
0006   * Copyright (c) 2005, LCG ROOT FNAL MathLib Team                    *
0007   *                                                                    *
0008   *                                                                    *
0009   **********************************************************************/
0010 
0011 // Header file for class implementations of Distance() functions among
0012 // Rotations in 3 dimensions
0013 //
0014 // Created by: Mark Fischler and Walter Brown Thurs July 7, 2005
0015 //
0016 // Last update: $Id$
0017 //
0018 #ifndef ROOT_Math_GenVector_3DDistances
0019 #define ROOT_Math_GenVector_3DDistances  1
0020 
0021 #include "Math/GenVector/Rotation3Dfwd.h"
0022 #include "Math/GenVector/AxisAnglefwd.h"
0023 #include "Math/GenVector/EulerAnglesfwd.h"
0024 #include "Math/GenVector/Quaternionfwd.h"
0025 #include "Math/GenVector/RotationZYXfwd.h"
0026 #include "Math/GenVector/RotationXfwd.h"
0027 #include "Math/GenVector/RotationYfwd.h"
0028 #include "Math/GenVector/RotationZfwd.h"
0029 
0030 namespace ROOT {
0031 namespace Math {
0032 namespace gv_detail {
0033 
0034 // Technical note:
0035 //
0036 // Most of these functions are identical, converting to Quaternions
0037 // and then taking the simple distance between two Quaternions.  This
0038 // makes it tempting to use a template function (which could appear in
0039 // each individual rotation header).
0040 //
0041 // However, then we would have to include Quaternion.h in this header,
0042 // and by induction, each rotation class would depend on Quaternion, which
0043 // would be undesirable.
0044 
0045 
0046 // ----------------------------------------------------------------------
0047 // Distance from Rotation3D
0048 
0049 double dist( Rotation3D const & r1, Rotation3D  const & r2);
0050 double dist( Rotation3D const & r1, AxisAngle   const & r2);
0051 double dist( Rotation3D const & r1, EulerAngles const & r2);
0052 double dist( Rotation3D const & r1, Quaternion  const & r2);
0053 double dist( Rotation3D const & r1, RotationZYX const & r2);
0054 double dist( Rotation3D const & r1, RotationX   const & r2);
0055 double dist( Rotation3D const & r1, RotationY   const & r2);
0056 double dist( Rotation3D const & r1, RotationZ   const & r2);
0057 
0058 
0059 // ----------------------------------------------------------------------
0060 // Distance from AxisAngle
0061 
0062 double dist( AxisAngle const & r1, Rotation3D  const & r2);
0063 double dist( AxisAngle const & r1, AxisAngle   const & r2);
0064 double dist( AxisAngle const & r1, EulerAngles const & r2);
0065 double dist( AxisAngle const & r1, Quaternion  const & r2);
0066 double dist( AxisAngle const & r1, RotationZYX const & r2);
0067 double dist( AxisAngle const & r1, RotationX   const & r2);
0068 double dist( AxisAngle const & r1, RotationY   const & r2);
0069 double dist( AxisAngle const & r1, RotationZ   const & r2);
0070 
0071 
0072 // ----------------------------------------------------------------------
0073 // Distance from EulerAngles
0074 
0075 double dist( EulerAngles const & r1, Rotation3D  const & r2);
0076 double dist( EulerAngles const & r1, AxisAngle   const & r2);
0077 double dist( EulerAngles const & r1, EulerAngles const & r2);
0078 double dist( EulerAngles const & r1, Quaternion  const & r2);
0079 double dist( EulerAngles const & r1, RotationZYX const & r2);
0080 double dist( EulerAngles const & r1, RotationX   const & r2);
0081 double dist( EulerAngles const & r1, RotationY   const & r2);
0082 double dist( EulerAngles const & r1, RotationZ   const & r2);
0083 
0084 
0085 // ----------------------------------------------------------------------
0086 // Distance from Quaternion
0087 
0088 double dist( Quaternion const & r1, Rotation3D  const & r2);
0089 double dist( Quaternion const & r1, AxisAngle   const & r2);
0090 double dist( Quaternion const & r1, EulerAngles const & r2);
0091 double dist( Quaternion const & r1, Quaternion  const & r2);
0092 double dist( Quaternion const & r1, RotationZYX const & r2);
0093 double dist( Quaternion const & r1, RotationX   const & r2);
0094 double dist( Quaternion const & r1, RotationY   const & r2);
0095 double dist( Quaternion const & r1, RotationZ   const & r2);
0096 
0097 // ----------------------------------------------------------------------
0098 // Distance from RotationZYX
0099 
0100 double dist( RotationZYX const & r1, Rotation3D  const & r2);
0101 double dist( RotationZYX const & r1, AxisAngle   const & r2);
0102 double dist( RotationZYX const & r1, EulerAngles const & r2);
0103 double dist( RotationZYX const & r1, Quaternion  const & r2);
0104 double dist( RotationZYX const & r1, RotationZYX const & r2);
0105 double dist( RotationZYX const & r1, RotationX   const & r2);
0106 double dist( RotationZYX const & r1, RotationY   const & r2);
0107 double dist( RotationZYX const & r1, RotationZ   const & r2);
0108 
0109 
0110 
0111 // ----------------------------------------------------------------------
0112 // Distance from RotationX
0113 
0114 double dist( RotationX const & r1, Rotation3D  const & r2);
0115 double dist( RotationX const & r1, AxisAngle   const & r2);
0116 double dist( RotationX const & r1, EulerAngles const & r2);
0117 double dist( RotationX const & r1, Quaternion  const & r2);
0118 double dist( RotationX const & r1, RotationX   const & r2);
0119 double dist( RotationX const & r1, RotationY   const & r2);
0120 double dist( RotationX const & r1, RotationZ   const & r2);
0121 
0122 
0123 // ----------------------------------------------------------------------
0124 // Distance from RotationY
0125 
0126 double dist( RotationY const & r1, Rotation3D  const & r2);
0127 double dist( RotationY const & r1, AxisAngle   const & r2);
0128 double dist( RotationY const & r1, EulerAngles const & r2);
0129 double dist( RotationY const & r1, Quaternion  const & r2);
0130 double dist( RotationY const & r1, RotationX   const & r2);
0131 double dist( RotationY const & r1, RotationY   const & r2);
0132 double dist( RotationY const & r1, RotationZ   const & r2);
0133 
0134 
0135 // ----------------------------------------------------------------------
0136 // Distance from RotationZ
0137 
0138 double dist( RotationZ const  & r1, Rotation3D  const & r2);
0139 double dist( RotationZ const  & r1, AxisAngle   const & r2);
0140 double dist( RotationZ const  & r1, EulerAngles const & r2);
0141 double dist( RotationZ const  & r1, Quaternion  const & r2);
0142 double dist( RotationZ const  & r1, RotationX   const & r2);
0143 double dist( RotationZ const  & r1, RotationY   const & r2);
0144 double dist( RotationZ const  & r1, RotationZ   const & r2);
0145 
0146 
0147 } //namespace gv_detail
0148 } //namespace Math
0149 } //namespace ROOT
0150 
0151 #endif // ROOT_Math_GenVector_3DDistances