Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-01-07 10:20:34

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  */
0050 
0051 void convert( Rotation3D const & from, AxisAngle   & to);
0052 void convert( Rotation3D const & from, EulerAngles & to);
0053 void convert( Rotation3D const & from, Quaternion  & to);
0054 void convert( Rotation3D const & from, RotationZYX & to);
0055 
0056 
0057 // ----------------------------------------------------------------------
0058 // conversions from AxisAngle
0059 
0060 void convert( AxisAngle const & from, Rotation3D  & to);
0061 void convert( AxisAngle const & from, EulerAngles & to);
0062 void convert( AxisAngle const & from, Quaternion  & to);
0063 void convert( AxisAngle const & from, RotationZYX & to);
0064 
0065 
0066 // ----------------------------------------------------------------------
0067 // conversions from EulerAngles
0068 
0069 void convert( EulerAngles const & from, Rotation3D  & to);
0070 void convert( EulerAngles const & from, AxisAngle   & to);
0071 void convert( EulerAngles const & from, Quaternion  & to);
0072 void convert( EulerAngles const & from, RotationZYX & to);
0073 
0074 
0075 // ----------------------------------------------------------------------
0076 // conversions from Quaternion
0077 
0078 void convert( Quaternion const & from, Rotation3D  & to);
0079 void convert( Quaternion const & from, AxisAngle   & to);
0080 void convert( Quaternion const & from, EulerAngles & to);
0081 void convert( Quaternion const & from, RotationZYX & to);
0082 
0083 // ----------------------------------------------------------------------
0084 // conversions from RotationZYX
0085 
0086 void convert( RotationZYX const & from, Rotation3D  & to);
0087 void convert( RotationZYX const & from, AxisAngle   & to);
0088 void convert( RotationZYX const & from, EulerAngles & to);
0089 void convert( RotationZYX const & from, Quaternion  & to);
0090 
0091 
0092 // ----------------------------------------------------------------------
0093 // conversions from RotationX
0094 
0095 void convert( RotationX const & from, Rotation3D  & to);
0096 void convert( RotationX const & from, RotationZYX & to);
0097 void convert( RotationX const & from, AxisAngle   & to);
0098 void convert( RotationX const & from, EulerAngles & to);
0099 void convert( RotationX const & from, Quaternion  & to);
0100 
0101 
0102 // ----------------------------------------------------------------------
0103 // conversions from RotationY
0104 
0105 void convert( RotationY const & from, Rotation3D  & to);
0106 void convert( RotationY const & from, RotationZYX & to);
0107 void convert( RotationY const & from, AxisAngle   & to);
0108 void convert( RotationY const & from, EulerAngles & to);
0109 void convert( RotationY const & from, Quaternion  & to);
0110 
0111 
0112 // ----------------------------------------------------------------------
0113 // conversions from RotationZ
0114 
0115 void convert( RotationZ const & from, Rotation3D  & to);
0116 void convert( RotationZ const & from, RotationZYX & to);
0117 void convert( RotationZ const & from, AxisAngle   & to);
0118 void convert( RotationZ const & from, EulerAngles & to);
0119 void convert( RotationZ const & from, Quaternion  & to);
0120 
0121 
0122 } //namespace gv_detail
0123 } //namespace Math
0124 } //namespace ROOT
0125 
0126 #endif // ROOT_Math_GenVector_3DConversions