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 
30 namespace ROOT {
31 namespace Math {
32 
33 
34 namespace gv_detail {
35 
36 // flag a link time error when a wrong conversion is instantiated
39  };
40 template<class R1, class R2>
41 void 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 
53 void convert( Rotation3D const & from, AxisAngle & to);
54 void convert( Rotation3D const & from, EulerAngles & to);
55 void convert( Rotation3D const & from, Quaternion & to);
56 void convert( Rotation3D const & from, RotationZYX & to);
57 
58 
59 // ----------------------------------------------------------------------
60 // conversions from AxisAngle
61 
62 void convert( AxisAngle const & from, Rotation3D & to);
63 void convert( AxisAngle const & from, EulerAngles & to);
64 void convert( AxisAngle const & from, Quaternion & to);
65 void convert( AxisAngle const & from, RotationZYX & to);
66 
67 
68 // ----------------------------------------------------------------------
69 // conversions from EulerAngles
70 
71 void convert( EulerAngles const & from, Rotation3D & to);
72 void convert( EulerAngles const & from, AxisAngle & to);
73 void convert( EulerAngles const & from, Quaternion & to);
74 void convert( EulerAngles const & from, RotationZYX & to);
75 
76 
77 // ----------------------------------------------------------------------
78 // conversions from Quaternion
79 
80 void convert( Quaternion const & from, Rotation3D & to);
81 void convert( Quaternion const & from, AxisAngle & to);
82 void convert( Quaternion const & from, EulerAngles & to);
83 void convert( Quaternion const & from, RotationZYX & to);
84 
85 // ----------------------------------------------------------------------
86 // conversions from RotationZYX
87 
88 void convert( RotationZYX const & from, Rotation3D & to);
89 void convert( RotationZYX const & from, AxisAngle & to);
90 void convert( RotationZYX const & from, EulerAngles & to);
91 void convert( RotationZYX const & from, Quaternion & to);
92 
93 
94 // ----------------------------------------------------------------------
95 // conversions from RotationX
96 
97 void convert( RotationX const & from, Rotation3D & to);
98 void convert( RotationX const & from, RotationZYX & to);
99 void convert( RotationX const & from, AxisAngle & to);
100 void convert( RotationX const & from, EulerAngles & to);
101 void convert( RotationX const & from, Quaternion & to);
102 
103 
104 // ----------------------------------------------------------------------
105 // conversions from RotationY
106 
107 void convert( RotationY const & from, Rotation3D & to);
108 void convert( RotationY const & from, RotationZYX & to);
109 void convert( RotationY const & from, AxisAngle & to);
110 void convert( RotationY const & from, EulerAngles & to);
111 void convert( RotationY const & from, Quaternion & to);
112 
113 
114 // ----------------------------------------------------------------------
115 // conversions from RotationZ
116 
117 void convert( RotationZ const & from, Rotation3D & to);
118 void convert( RotationZ const & from, RotationZYX & to);
119 void convert( RotationZ const & from, AxisAngle & to);
120 void convert( RotationZ const & from, EulerAngles & to);
121 void 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
RotationXfwd.h
R2
#define R2(v, w, x, y, z, i)
Definition: sha1.inl:137
ROOT::Math::AxisAngle
AxisAngle class describing rotation represented with direction axis (3D Vector) and an angle of rotat...
Definition: AxisAngle.h:41
Rotation3Dfwd.h
ROOT::Math::RotationZYX
Rotation class with the (3D) rotation represented by angles describing first a rotation of an angle p...
Definition: RotationZYX.h:61
ROOT::Math::RotationZ
Rotation class representing a 3D rotation about the Z axis by the angle of rotation.
Definition: RotationZ.h:43
ROOT::Math::Rotation3D
Rotation class with the (3D) rotation represented by a 3x3 orthogonal matrix.
Definition: Rotation3D.h:65
RotationYfwd.h
ROOT::Math::gv_detail::ERROR_This_Rotation_Conversion_is_NOT_Supported::ERROR_This_Rotation_Conversion_is_NOT_Supported
ERROR_This_Rotation_Conversion_is_NOT_Supported()
RotationZYXfwd.h
AxisAnglefwd.h
ROOT::Math::gv_detail::ERROR_This_Rotation_Conversion_is_NOT_Supported
Definition: 3DConversions.h:37
ROOT::Math::EulerAngles
EulerAngles class describing rotation as three angles (Euler Angles).
Definition: EulerAngles.h:43
ROOT::Math::RotationX
Rotation class representing a 3D rotation about the X axis by the angle of rotation.
Definition: RotationX.h:43
RotationZfwd.h
ROOT::Math::gv_detail::convert
void convert(R1 const &, R2 const)
Definition: 3DConversions.h:41
ROOT::Math::Quaternion
Rotation class with the (3D) rotation represented by a unit quaternion (u, i, j, k).
Definition: Quaternion.h:47
Quaternionfwd.h
EulerAnglesfwd.h
R1
#define R1(v, w, x, y, z, i)
Definition: sha1.inl:134
ROOT
VSD Structures.
Definition: StringConv.hxx:21
Math
Namespace for new Math classes and functions.
ROOT::Math::RotationY
Rotation class representing a 3D rotation about the Y axis by the angle of rotation.
Definition: RotationY.h:43