Logo ROOT  
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
30namespace ROOT {
31namespace Math {
32namespace 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
49double dist( Rotation3D const & r1, Rotation3D const & r2);
50double dist( Rotation3D const & r1, AxisAngle const & r2);
51double dist( Rotation3D const & r1, EulerAngles const & r2);
52double dist( Rotation3D const & r1, Quaternion const & r2);
53double dist( Rotation3D const & r1, RotationZYX const & r2);
54double dist( Rotation3D const & r1, RotationX const & r2);
55double dist( Rotation3D const & r1, RotationY const & r2);
56double dist( Rotation3D const & r1, RotationZ const & r2);
57
58
59// ----------------------------------------------------------------------
60// Distance from AxisAngle
61
62double dist( AxisAngle const & r1, Rotation3D const & r2);
63double dist( AxisAngle const & r1, AxisAngle const & r2);
64double dist( AxisAngle const & r1, EulerAngles const & r2);
65double dist( AxisAngle const & r1, Quaternion const & r2);
66double dist( AxisAngle const & r1, RotationZYX const & r2);
67double dist( AxisAngle const & r1, RotationX const & r2);
68double dist( AxisAngle const & r1, RotationY const & r2);
69double dist( AxisAngle const & r1, RotationZ const & r2);
70
71
72// ----------------------------------------------------------------------
73// Distance from EulerAngles
74
75double dist( EulerAngles const & r1, Rotation3D const & r2);
76double dist( EulerAngles const & r1, AxisAngle const & r2);
77double dist( EulerAngles const & r1, EulerAngles const & r2);
78double dist( EulerAngles const & r1, Quaternion const & r2);
79double dist( EulerAngles const & r1, RotationZYX const & r2);
80double dist( EulerAngles const & r1, RotationX const & r2);
81double dist( EulerAngles const & r1, RotationY const & r2);
82double dist( EulerAngles const & r1, RotationZ const & r2);
83
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
111// ----------------------------------------------------------------------
112// Distance from RotationX
113
114double dist( RotationX const & r1, Rotation3D const & r2);
115double dist( RotationX const & r1, AxisAngle const & r2);
116double dist( RotationX const & r1, EulerAngles const & r2);
117double dist( RotationX const & r1, Quaternion const & r2);
118double dist( RotationX const & r1, RotationX const & r2);
119double dist( RotationX const & r1, RotationY const & r2);
120double dist( RotationX const & r1, RotationZ const & r2);
121
122
123// ----------------------------------------------------------------------
124// Distance from RotationY
125
126double dist( RotationY const & r1, Rotation3D const & r2);
127double dist( RotationY const & r1, AxisAngle const & r2);
128double dist( RotationY const & r1, EulerAngles const & r2);
129double dist( RotationY const & r1, Quaternion const & r2);
130double dist( RotationY const & r1, RotationX const & r2);
131double dist( RotationY const & r1, RotationY const & r2);
132double dist( RotationY const & r1, RotationZ const & r2);
133
134
135// ----------------------------------------------------------------------
136// Distance from RotationZ
137
138double dist( RotationZ const & r1, Rotation3D const & r2);
139double dist( RotationZ const & r1, AxisAngle const & r2);
140double dist( RotationZ const & r1, EulerAngles const & r2);
141double dist( RotationZ const & r1, Quaternion const & r2);
142double dist( RotationZ const & r1, RotationX const & r2);
143double dist( RotationZ const & r1, RotationY const & r2);
144double 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
Namespace for new Math classes and functions.
double dist(Rotation3D const &r1, Rotation3D const &r2)
Definition: 3DDistances.cxx:48
VSD Structures.
Definition: StringConv.hxx:21