Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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 implementations 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_MathX_GenVectorX_3DDistances
19#define ROOT_MathX_GenVectorX_3DDistances 1
20
29
31
33
34namespace ROOT {
35namespace ROOT_MATH_ARCH {
36namespace gv_detail {
37
38// Technical note:
39//
40// Most of these functions are identical, converting to Quaternions
41// and then taking the simple distance between two Quaternions. This
42// makes it tempting to use a template function (which could appear in
43// each individual rotation header).
44//
45// However, then we would have to include Quaternion.h in this header,
46// and by induction, each rotation class would depend on Quaternion, which
47// would be undesirable.
48
49// ----------------------------------------------------------------------
50// Distance from Rotation3D
51
52double dist(Rotation3D const &r1, Rotation3D const &r2);
53double dist(Rotation3D const &r1, AxisAngle const &r2);
54double dist(Rotation3D const &r1, EulerAngles const &r2);
55double dist(Rotation3D const &r1, Quaternion const &r2);
56double dist(Rotation3D const &r1, RotationZYX const &r2);
57double dist(Rotation3D const &r1, RotationX const &r2);
58double dist(Rotation3D const &r1, RotationY const &r2);
59double dist(Rotation3D const &r1, RotationZ const &r2);
60
61// ----------------------------------------------------------------------
62// Distance from AxisAngle
63
64double dist(AxisAngle const &r1, Rotation3D const &r2);
65double dist(AxisAngle const &r1, AxisAngle const &r2);
66double dist(AxisAngle const &r1, EulerAngles const &r2);
67double dist(AxisAngle const &r1, Quaternion const &r2);
68double dist(AxisAngle const &r1, RotationZYX const &r2);
69double dist(AxisAngle const &r1, RotationX const &r2);
70double dist(AxisAngle const &r1, RotationY const &r2);
71double dist(AxisAngle const &r1, RotationZ const &r2);
72
73// ----------------------------------------------------------------------
74// Distance from EulerAngles
75
76double dist(EulerAngles const &r1, Rotation3D const &r2);
77double dist(EulerAngles const &r1, AxisAngle const &r2);
78double dist(EulerAngles const &r1, EulerAngles const &r2);
79double dist(EulerAngles const &r1, Quaternion const &r2);
80double dist(EulerAngles const &r1, RotationZYX const &r2);
81double dist(EulerAngles const &r1, RotationX const &r2);
82double dist(EulerAngles const &r1, RotationY const &r2);
83double dist(EulerAngles const &r1, RotationZ const &r2);
84
85// ----------------------------------------------------------------------
86// Distance from Quaternion
87
88double dist(Quaternion const &r1, Rotation3D const &r2);
89double dist(Quaternion const &r1, AxisAngle const &r2);
90double dist(Quaternion const &r1, EulerAngles const &r2);
91double dist(Quaternion const &r1, Quaternion const &r2);
92double dist(Quaternion const &r1, RotationZYX const &r2);
93double dist(Quaternion const &r1, RotationX const &r2);
94double dist(Quaternion const &r1, RotationY const &r2);
95double dist(Quaternion const &r1, RotationZ const &r2);
96
97// ----------------------------------------------------------------------
98// Distance from RotationZYX
99
100double dist(RotationZYX const &r1, Rotation3D const &r2);
101double dist(RotationZYX const &r1, AxisAngle const &r2);
102double dist(RotationZYX const &r1, EulerAngles const &r2);
103double dist(RotationZYX const &r1, Quaternion const &r2);
104double dist(RotationZYX const &r1, RotationZYX const &r2);
105double dist(RotationZYX const &r1, RotationX const &r2);
106double dist(RotationZYX const &r1, RotationY const &r2);
107double dist(RotationZYX const &r1, RotationZ const &r2);
108
109// ----------------------------------------------------------------------
110// Distance from RotationX
111
112double dist(RotationX const &r1, Rotation3D const &r2);
113double dist(RotationX const &r1, AxisAngle const &r2);
114double dist(RotationX const &r1, EulerAngles const &r2);
115double dist(RotationX const &r1, Quaternion const &r2);
116double dist(RotationX const &r1, RotationX const &r2);
117double dist(RotationX const &r1, RotationY const &r2);
118double dist(RotationX const &r1, RotationZ const &r2);
119
120// ----------------------------------------------------------------------
121// Distance from RotationY
122
123double dist(RotationY const &r1, Rotation3D const &r2);
124double dist(RotationY const &r1, AxisAngle const &r2);
125double dist(RotationY const &r1, EulerAngles const &r2);
126double dist(RotationY const &r1, Quaternion const &r2);
127double dist(RotationY const &r1, RotationX const &r2);
128double dist(RotationY const &r1, RotationY const &r2);
129double dist(RotationY const &r1, RotationZ const &r2);
130
131// ----------------------------------------------------------------------
132// Distance from RotationZ
133
134double dist(RotationZ const &r1, Rotation3D const &r2);
135double dist(RotationZ const &r1, AxisAngle const &r2);
136double dist(RotationZ const &r1, EulerAngles const &r2);
137double dist(RotationZ const &r1, Quaternion const &r2);
138double dist(RotationZ const &r1, RotationX const &r2);
139double dist(RotationZ const &r1, RotationY const &r2);
140double dist(RotationZ const &r1, RotationZ const &r2);
141
142} // namespace gv_detail
143} // namespace ROOT_MATH_ARCH
144} // namespace ROOT
145
146#endif // ROOT_MathX_GenVectorX_3DDistances
double dist(Rotation3D const &r1, Rotation3D const &r2)