Logo ROOT  
Reference Guide
3DConversions.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 Rotation in 3 dimensions, represented by 3x3 matrix
12//
13// Created by: Mark Fischler and Walter Brown Thurs July 7, 2005
14//
15// Last update: Wed Thurs July 7, 2005
16//
17#ifndef ROOT_Math_GenVector_3DConversions
18#define ROOT_Math_GenVector_3DConversions 1
19
28
29
30namespace ROOT {
31namespace Math {
32
33
34namespace gv_detail {
35
36// flag a link time error when a wrong conversion is instantiated
39 };
40template<class R1, class R2>
41void convert( R1 const &, R2 const) {
43}
44
45// ----------------------------------------------------------------------
46// conversions from Rotation3D
47/**
48 conversion functions from 3D rotation.
49 For converting to Euler Angles see
50 <A><HREF="http://www.cern.ch/mathlibs/documents/eulerAngleComputation.pdf">here</A>
51 */
52
53void convert( Rotation3D const & from, AxisAngle & to);
54void convert( Rotation3D const & from, EulerAngles & to);
55void convert( Rotation3D const & from, Quaternion & to);
56void convert( Rotation3D const & from, RotationZYX & to);
57
58
59// ----------------------------------------------------------------------
60// conversions from AxisAngle
61
62void convert( AxisAngle const & from, Rotation3D & to);
63void convert( AxisAngle const & from, EulerAngles & to);
64void convert( AxisAngle const & from, Quaternion & to);
65void convert( AxisAngle const & from, RotationZYX & to);
66
67
68// ----------------------------------------------------------------------
69// conversions from EulerAngles
70
71void convert( EulerAngles const & from, Rotation3D & to);
72void convert( EulerAngles const & from, AxisAngle & to);
73void convert( EulerAngles const & from, Quaternion & to);
74void convert( EulerAngles const & from, RotationZYX & to);
75
76
77// ----------------------------------------------------------------------
78// conversions from Quaternion
79
80void convert( Quaternion const & from, Rotation3D & to);
81void convert( Quaternion const & from, AxisAngle & to);
82void convert( Quaternion const & from, EulerAngles & to);
83void convert( Quaternion const & from, RotationZYX & to);
84
85// ----------------------------------------------------------------------
86// conversions from RotationZYX
87
88void convert( RotationZYX const & from, Rotation3D & to);
89void convert( RotationZYX const & from, AxisAngle & to);
90void convert( RotationZYX const & from, EulerAngles & to);
91void convert( RotationZYX const & from, Quaternion & to);
92
93
94// ----------------------------------------------------------------------
95// conversions from RotationX
96
97void convert( RotationX const & from, Rotation3D & to);
98void convert( RotationX const & from, RotationZYX & to);
99void convert( RotationX const & from, AxisAngle & to);
100void convert( RotationX const & from, EulerAngles & to);
101void convert( RotationX const & from, Quaternion & to);
102
103
104// ----------------------------------------------------------------------
105// conversions from RotationY
106
107void convert( RotationY const & from, Rotation3D & to);
108void convert( RotationY const & from, RotationZYX & to);
109void convert( RotationY const & from, AxisAngle & to);
110void convert( RotationY const & from, EulerAngles & to);
111void convert( RotationY const & from, Quaternion & to);
112
113
114// ----------------------------------------------------------------------
115// conversions from RotationZ
116
117void convert( RotationZ const & from, Rotation3D & to);
118void convert( RotationZ const & from, RotationZYX & to);
119void convert( RotationZ const & from, AxisAngle & to);
120void convert( RotationZ const & from, EulerAngles & to);
121void convert( RotationZ const & from, Quaternion & to);
122
123
124} //namespace gv_detail
125} //namespace Math
126} //namespace ROOT
127
128#endif // ROOT_Math_GenVector_3DConversions
AxisAngle class describing rotation represented with direction axis (3D Vector) and an angle of rotat...
Definition: AxisAngle.h:41
EulerAngles class describing rotation as three angles (Euler Angles).
Definition: EulerAngles.h:43
Rotation class with the (3D) rotation represented by a unit quaternion (u, i, j, k).
Definition: Quaternion.h:47
Rotation class with the (3D) rotation represented by a 3x3 orthogonal matrix.
Definition: Rotation3D.h:65
Rotation class representing a 3D rotation about the X axis by the angle of rotation.
Definition: RotationX.h:43
Rotation class representing a 3D rotation about the Y axis by the angle of rotation.
Definition: RotationY.h:43
Rotation class with the (3D) rotation represented by angles describing first a rotation of an angle p...
Definition: RotationZYX.h:61
Rotation class representing a 3D rotation about the Z axis by the angle of rotation.
Definition: RotationZ.h:43
Namespace for new Math classes and functions.
void convert(R1 const &, R2 const)
Definition: 3DConversions.h:41
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition: StringConv.hxx:21
#define R1(v, w, x, y, z, i)
Definition: sha1.inl:134
#define R2(v, w, x, y, z, i)
Definition: sha1.inl:137