00001 //*************************************************************************************** 00002 // File supervisor: Crosswalk team 00012 //*************************************************************************************** 00013 00014 #if (_MSC_VER > 1000) || defined(SGI_COMPILER) 00015 #pragma once 00016 #endif 00017 00018 //****************************************************************************** 00019 // Defines 00020 //****************************************************************************** 00021 00022 #ifndef _SIBCMATHLIB_H_ 00023 #define _SIBCMATHLIB_H_ 00024 00025 //****************************************************************************** 00026 // Includes 00027 //****************************************************************************** 00028 #include <math.h> // for DBL_MAX 00029 #include <float.h> 00030 #include "SIBCUtil.h" 00031 00032 00038 typedef enum tagE3DAXISTYPE 00039 { 00040 X_AXIS = 0, 00041 Y_AXIS = 1, 00042 Z_AXIS = 2 00043 } E3DAxisType; 00044 00047 enum { 00048 NO_COORD_AXIS = 0x00, 00049 X_COORD_AXIS = 0x01, 00050 Y_COORD_AXIS = 0x02, 00051 Z_COORD_AXIS = 0x04, 00052 ALL_COORD_AXES = (X_COORD_AXIS | Y_COORD_AXIS | Z_COORD_AXIS) 00053 } ; 00054 00055 typedef double DOUBLE; 00057 const DOUBLE PICO_EPS = 1.0e-12; 00058 const DOUBLE NANO_EPS = 1.0e-09; 00059 const DOUBLE HEXA_EPS = 1.0e-06; 00060 const DOUBLE MILLI_EPS = 1.0e-03; 00061 const DOUBLE SI_HUGE = DBL_MAX; 00064 #define M_PI 3.14159265358979323846 // already documented in SIBCMath.h 00065 #define M_E 2.7182818284590452354 // already documented in SIBCMath.h 00066 00070 #define M_2PI ( 2 * M_PI ) 00071 #define M_Inv_PI ( 1.0 / M_PI ) 00072 #define M_Inv_2PI ( 0.5 / M_PI ) 00079 #define DEG_TO_RAD( deg ) ((deg)*M_PI/180.0) 00080 00086 #define RAD_TO_DEG( rad ) ((rad)*180.0*M_Inv_PI) 00087 00089 // Old defines from S35MthConsts.h (these are not documented). 00090 #define SI_DEGREES_PER_RAD (180.0/M_PI) 00091 #define SI_RAD_PER_DEGREES (M_PI/180.0) 00092 #define _SI_RAD2DEG( x ) ( (x) * SI_DEGREES_PER_RAD ) 00093 #define _SI_DEG2RAD( x ) ( (x) * SI_RAD_PER_DEGREES ) 00094 00098 #ifndef NULL 00099 #define NULL 0 00100 #endif 00101 00103 class CSIBCVector2Dd; 00104 class CSIBCVector3Dd; 00105 class CSIBCVector4Dd; 00106 class CSIBCVectorwd; 00107 class CSIBCMatrix33d; 00108 class CSIBCMatrix44d; 00109 class CSIBCMatrixMNd; 00110 class CSIBCRotMatd; 00111 class CSIBCXfoMatd; 00112 class C3DQuat; 00113 class CSIBCRotationd; 00114 class CSIBCTransfod; 00115 00116 #include "SIBCMatrix33d.h" 00117 #include "SIBCRotMatd.h" 00118 #include "SIBCMatrix44d.h" 00119 #include "SIBCXfoMatd.h" 00120 #include "SIBCVector2Dd.h" 00121 #include "SIBCVector3Dd.h" 00122 #include "SIBCVector4Dd.h" 00123 #include "SIBCVectorwd.h" 00124 #include "SIBCQuaterniond.h" 00125 #include "SIBCRotationd.h" 00126 #include "SIBCTransfod.h" 00127 #include "SIBCMatrixMNd.h" 00128 00129 #endif