Logo ROOT   6.12/07
Reference Guide
3DDistances.h
Go to the documentation of this file.
1 // @(#)root/mathcore:$Id$
2 // Authors: W. Brown, M. Fischler, L. Moneta 2005
3 
4  /**********************************************************************
5  * *
6  * Copyright (c) 2005, LCG ROOT FNAL MathLib Team *
7  * *
8  * *
9  **********************************************************************/
10 
11 // Header file for class implementatoins of DIstance() functions among
12 // Rotations in 3 dimensions
13 //
14 // Created by: Mark Fischler and Walter Brown Thurs July 7, 2005
15 //
16 // Last update: $Id$
17 //
18 #ifndef ROOT_Math_GenVector_3DDistances
19 #define ROOT_Math_GenVector_3DDistances 1
20 
29 
30 namespace ROOT {
31 namespace Math {
32 namespace gv_detail {
33 
34 // Technical note:
35 //
36 // Most of these functions are identical, converting to Quaternions
37 // and then taking the simple distance between two Quaternions. This
38 // makes it tempting to use a template function (which could appear in
39 // each individual rotation header).
40 //
41 // However, then we would have to include Quaternion.h in this header,
42 // and by induction, each rotation class would depend on Quaternion, which
43 // would be undesirable.
44 
45 
46 // ----------------------------------------------------------------------
47 // Distance from Rotation3D
48 
49 double dist( Rotation3D const & r1, Rotation3D const & r2);
50 double dist( Rotation3D const & r1, AxisAngle const & r2);
51 double dist( Rotation3D const & r1, EulerAngles const & r2);
52 double dist( Rotation3D const & r1, Quaternion const & r2);
53 double dist( Rotation3D const & r1, RotationZYX const & r2);
54 double dist( Rotation3D const & r1, RotationX const & r2);
55 double dist( Rotation3D const & r1, RotationY const & r2);
56 double dist( Rotation3D const & r1, RotationZ const & r2);
57 
58 
59 // ----------------------------------------------------------------------
60 // Distance from AxisAngle
61 
62 double dist( AxisAngle const & r1, Rotation3D const & r2);
63 double dist( AxisAngle const & r1, AxisAngle const & r2);
64 double dist( AxisAngle const & r1, EulerAngles const & r2);
65 double dist( AxisAngle const & r1, Quaternion const & r2);
66 double dist( AxisAngle const & r1, RotationZYX const & r2);
67 double dist( AxisAngle const & r1, RotationX const & r2);
68 double dist( AxisAngle const & r1, RotationY const & r2);
69 double dist( AxisAngle const & r1, RotationZ const & r2);
70 
71 
72 // ----------------------------------------------------------------------
73 // Distance from EulerAngles
74 
75 double dist( EulerAngles const & r1, Rotation3D const & r2);
76 double dist( EulerAngles const & r1, AxisAngle const & r2);
77 double dist( EulerAngles const & r1, EulerAngles const & r2);
78 double dist( EulerAngles const & r1, Quaternion const & r2);
79 double dist( EulerAngles const & r1, RotationZYX const & r2);
80 double dist( EulerAngles const & r1, RotationX const & r2);
81 double dist( EulerAngles const & r1, RotationY const & r2);
82 double dist( EulerAngles const & r1, RotationZ const & r2);
83 
84 
85 // ----------------------------------------------------------------------
86 // Distance from Quaternion
87 
88 double dist( Quaternion const & r1, Rotation3D const & r2);
89 double dist( Quaternion const & r1, AxisAngle const & r2);
90 double dist( Quaternion const & r1, EulerAngles const & r2);
91 double dist( Quaternion const & r1, Quaternion const & r2);
92 double dist( Quaternion const & r1, RotationZYX const & r2);
93 double dist( Quaternion const & r1, RotationX const & r2);
94 double dist( Quaternion const & r1, RotationY const & r2);
95 double dist( Quaternion const & r1, RotationZ const & r2);
96 
97 // ----------------------------------------------------------------------
98 // Distance from RotationZYX
99 
100 double dist( RotationZYX const & r1, Rotation3D const & r2);
101 double dist( RotationZYX const & r1, AxisAngle const & r2);
102 double dist( RotationZYX const & r1, EulerAngles const & r2);
103 double dist( RotationZYX const & r1, Quaternion const & r2);
104 double dist( RotationZYX const & r1, RotationZYX const & r2);
105 double dist( RotationZYX const & r1, RotationX const & r2);
106 double dist( RotationZYX const & r1, RotationY const & r2);
107 double dist( RotationZYX const & r1, RotationZ const & r2);
108 
109 
110 
111 // ----------------------------------------------------------------------
112 // Distance from RotationX
113 
114 double dist( RotationX const & r1, Rotation3D const & r2);
115 double dist( RotationX const & r1, AxisAngle const & r2);
116 double dist( RotationX const & r1, EulerAngles const & r2);
117 double dist( RotationX const & r1, Quaternion const & r2);
118 double dist( RotationX const & r1, RotationX const & r2);
119 double dist( RotationX const & r1, RotationY const & r2);
120 double dist( RotationX const & r1, RotationZ const & r2);
121 
122 
123 // ----------------------------------------------------------------------
124 // Distance from RotationY
125 
126 double dist( RotationY const & r1, Rotation3D const & r2);
127 double dist( RotationY const & r1, AxisAngle const & r2);
128 double dist( RotationY const & r1, EulerAngles const & r2);
129 double dist( RotationY const & r1, Quaternion const & r2);
130 double dist( RotationY const & r1, RotationX const & r2);
131 double dist( RotationY const & r1, RotationY const & r2);
132 double dist( RotationY const & r1, RotationZ const & r2);
133 
134 
135 // ----------------------------------------------------------------------
136 // Distance from RotationZ
137 
138 double dist( RotationZ const & r1, Rotation3D const & r2);
139 double dist( RotationZ const & r1, AxisAngle const & r2);
140 double dist( RotationZ const & r1, EulerAngles const & r2);
141 double dist( RotationZ const & r1, Quaternion const & r2);
142 double dist( RotationZ const & r1, RotationX const & r2);
143 double dist( RotationZ const & r1, RotationY const & r2);
144 double dist( RotationZ const & r1, RotationZ const & r2);
145 
146 
147 } //namespace gv_detail
148 } //namespace Math
149 } //namespace ROOT
150 
151 #endif // ROOT_Math_GenVector_3DDistances
double dist(Rotation3D const &r1, Rotation3D const &r2)
Definition: 3DDistances.cxx:48
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
Namespace for new Math classes and functions.