00001
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #pragma once
00023 #ifndef VOLUMILL_INCLUDEEVERYWHERE_H
00024 #define VOLUMILL_INCLUDEEVERYWHERE_H
00025
00026 #include <boost/shared_ptr.hpp>
00027 using boost::shared_ptr;
00028 #include <vector>
00029 #include <math.h>
00030 #include <Util/Validate.h>
00031
00032 #ifdef WIN32
00033 #pragma warning (push)
00034 #pragma warning (disable : 4267)
00035 #endif
00036 #include <boost/archive/xml_iarchive.hpp>
00037 #include <boost/archive/xml_oarchive.hpp>
00038 #include <boost/archive/binary_iarchive.hpp>
00039 #include <boost/archive/binary_oarchive.hpp>
00040 #include <boost/serialization/is_abstract.hpp>
00041 #include <boost/serialization/nvp.hpp>
00042 #include <boost/serialization/base_object.hpp>
00043 #ifdef WIN32
00044 #pragma warning (pop)
00045 #endif
00046
00047 #ifdef WIN32
00048 #define Clearfp() _clearfp()
00049 #else
00050 #include <fenv.h>
00051 static inline unsigned int Clearfp(void)
00052 {
00053 int ret = fetestexcept(FE_ALL_EXCEPT);
00054 feclearexcept(FE_ALL_EXCEPT);
00055 return ret;
00056 }
00057 #endif
00058
00060 #ifdef WIN32
00061 #define OUT_EDGE_ITERATORS_EQUAL(x,y) boost::iterator_core_access::equal(x, y, boost::mpl::true_())
00062 #else
00063 #define OUT_EDGE_ITERATORS_EQUAL(x,y) (x == y)
00064 #endif
00065
00066 namespace util
00067 {
00068 const double doubleEps = 1e-8;
00069 const double intersectionEps = 1e-6;
00070 const double pointResolution = 1e-5;
00071 const double pi = 3.141592653589793238462643383279;
00072
00073 template<class T>
00074 inline void assignPtr (T* pT, const T& value)
00075 {
00076 if (pT)
00077 *pT = value;
00078 }
00079
00080 template<class T>
00081 inline void ignoreUnusedVariableWarning (const T&) {}
00082
00083 void sleep (int numSec);
00084 }
00085
00086 #endif