Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:10:09

0001 // @(#)root/mathcore:$Id$
0002 // Authors: W. Brown, M. Fischler, L. Moneta    2005
0003 
0004  /**********************************************************************
0005   *                                                                    *
0006   * Copyright (c) 2005, LCG ROOT FNAL MathLib Team                    *
0007   *                                                                    *
0008   *                                                                    *
0009   **********************************************************************/
0010 
0011 // Header file for class Rotation in 3 dimensions, represented by 3x3 matrix
0012 //
0013 // Created by: Mark Fischler and Walter Brown Thurs July 7, 2005
0014 //
0015 // Last update: Wed Thurs July 7, 2005
0016 //
0017 #ifndef ROOT_Math_GenVector_3DConversions
0018 #define ROOT_Math_GenVector_3DConversions  1
0019 
0020 #include "Math/GenVector/Rotation3Dfwd.h"
0021 #include "Math/GenVector/AxisAnglefwd.h"
0022 #include "Math/GenVector/EulerAnglesfwd.h"
0023 #include "Math/GenVector/Quaternionfwd.h"
0024 #include "Math/GenVector/RotationXfwd.h"
0025 #include "Math/GenVector/RotationYfwd.h"
0026 #include "Math/GenVector/RotationZfwd.h"
0027 #include "Math/GenVector/RotationZYXfwd.h"
0028 
0029 
0030 namespace ROOT {
0031 namespace Math {
0032 
0033 
0034 namespace gv_detail {
0035 
0036 // flag a link time error when a wrong conversion is instantiated
0037    struct ERROR_This_Rotation_Conversion_is_NOT_Supported {
0038       ERROR_This_Rotation_Conversion_is_NOT_Supported();
0039    };
0040 template<class R1, class R2>
0041 void convert( R1 const &, R2 const) {
0042    ERROR_This_Rotation_Conversion_is_NOT_Supported();
0043 }
0044 
0045 // ----------------------------------------------------------------------
0046 // conversions from Rotation3D
0047 /**
0048    conversion functions from 3D rotation.
0049    For converting to Euler Angles see
0050    <A><HREF="http://www.cern.ch/mathlibs/documents/eulerAngleComputation.pdf">here</A>
0051  */
0052 
0053 void convert( Rotation3D const & from, AxisAngle   & to);
0054 void convert( Rotation3D const & from, EulerAngles & to);
0055 void convert( Rotation3D const & from, Quaternion  & to);
0056 void convert( Rotation3D const & from, RotationZYX & to);
0057 
0058 
0059 // ----------------------------------------------------------------------
0060 // conversions from AxisAngle
0061 
0062 void convert( AxisAngle const & from, Rotation3D  & to);
0063 void convert( AxisAngle const & from, EulerAngles & to);
0064 void convert( AxisAngle const & from, Quaternion  & to);
0065 void convert( AxisAngle const & from, RotationZYX & to);
0066 
0067 
0068 // ----------------------------------------------------------------------
0069 // conversions from EulerAngles
0070 
0071 void convert( EulerAngles const & from, Rotation3D  & to);
0072 void convert( EulerAngles const & from, AxisAngle   & to);
0073 void convert( EulerAngles const & from, Quaternion  & to);
0074 void convert( EulerAngles const & from, RotationZYX & to);
0075 
0076 
0077 // ----------------------------------------------------------------------
0078 // conversions from Quaternion
0079 
0080 void convert( Quaternion const & from, Rotation3D  & to);
0081 void convert( Quaternion const & from, AxisAngle   & to);
0082 void convert( Quaternion const & from, EulerAngles & to);
0083 void convert( Quaternion const & from, RotationZYX & to);
0084 
0085 // ----------------------------------------------------------------------
0086 // conversions from RotationZYX
0087 
0088 void convert( RotationZYX const & from, Rotation3D  & to);
0089 void convert( RotationZYX const & from, AxisAngle   & to);
0090 void convert( RotationZYX const & from, EulerAngles & to);
0091 void convert( RotationZYX const & from, Quaternion  & to);
0092 
0093 
0094 // ----------------------------------------------------------------------
0095 // conversions from RotationX
0096 
0097 void convert( RotationX const & from, Rotation3D  & to);
0098 void convert( RotationX const & from, RotationZYX & to);
0099 void convert( RotationX const & from, AxisAngle   & to);
0100 void convert( RotationX const & from, EulerAngles & to);
0101 void convert( RotationX const & from, Quaternion  & to);
0102 
0103 
0104 // ----------------------------------------------------------------------
0105 // conversions from RotationY
0106 
0107 void convert( RotationY const & from, Rotation3D  & to);
0108 void convert( RotationY const & from, RotationZYX & to);
0109 void convert( RotationY const & from, AxisAngle   & to);
0110 void convert( RotationY const & from, EulerAngles & to);
0111 void convert( RotationY const & from, Quaternion  & to);
0112 
0113 
0114 // ----------------------------------------------------------------------
0115 // conversions from RotationZ
0116 
0117 void convert( RotationZ const & from, Rotation3D  & to);
0118 void convert( RotationZ const & from, RotationZYX & to);
0119 void convert( RotationZ const & from, AxisAngle   & to);
0120 void convert( RotationZ const & from, EulerAngles & to);
0121 void convert( RotationZ const & from, Quaternion  & to);
0122 
0123 
0124 } //namespace gv_detail
0125 } //namespace Math
0126 } //namespace ROOT
0127 
0128 #endif // ROOT_Math_GenVector_3DConversions