00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef PCL_WIN32_MACROS_H_
00036 #define PCL_WIN32_MACROS_H_
00037
00038
00039 #ifdef _WIN32
00040
00041
00042 # define NOMINMAX
00043
00044 # define pcl_isnan(x) _isnan(x)
00045 # define pcl_isfinite(x) _finite(x)
00046 # define pcl_isinf(x) (!_finite(x))
00047
00048 # define lrint(x) (floor(x+(x>0) ? 0.5 : -0.5))
00049
00050 # define __PRETTY_FUNCTION__ __FUNCTION__
00051 # define __func__ __FUNCTION__
00052
00053 #elif ANDROID
00054 # include <math.h>
00055 # define pcl_isnan(x) isnan(x)
00056 # define pcl_isfinite(x) isfinite(x)
00057 # define pcl_isinf(x) isinf(x)
00058
00059 #else
00060
00061 # define pcl_isnan(x) std::isnan(x)
00062 # define pcl_isfinite(x) std::isfinite(x)
00063 # define pcl_isinf(x) std::isinf(x)
00064
00065 #endif
00066
00067
00068 #ifndef M_PI
00069 #define M_PI 3.14159265358979323846
00070 #endif
00071
00072 #ifndef M_E
00073 #define M_E 2.7182818284590452354
00074 #endif
00075
00076
00077
00078 #if defined _WIN32 || defined __CYGWIN__
00079 #define PCL_HELPER_DLL_IMPORT __declspec(dllimport)
00080 #define PCL_HELPER_DLL_EXPORT __declspec(dllexport)
00081 #define PCL_HELPER_DLL_LOCAL
00082 #else
00083 #if __GNUC__ >= 4
00084 #define PCL_HELPER_DLL_IMPORT __attribute__ ((visibility("default")))
00085 #define PCL_HELPER_DLL_EXPORT __attribute__ ((visibility("default")))
00086 #define PCL_HELPER_DLL_LOCAL __attribute__ ((visibility("hidden")))
00087 #else
00088 #define PCL_HELPER_DLL_IMPORT
00089 #define PCL_HELPER_DLL_EXPORT
00090 #define PCL_HELPER_DLL_LOCAL
00091 #endif
00092 #endif
00093
00094
00095
00096
00097
00098 #ifdef PCL_DLL // defined if PCL is compiled as a DLL
00099 #ifdef PCL_DLL_EXPORTS // defined if we are building the PCL DLL (instead of using it)
00100 #define PCL_API PCL_HELPER_DLL_EXPORT
00101 #else
00102 #define PCL_API PCL_HELPER_DLL_IMPORT
00103 #endif // PCL_DLL_EXPORTS
00104 #define PCL_LOCAL PCL_HELPER_DLL_LOCAL
00105 #else // PCL_DLL is not defined: this means PCL is a static lib.
00106 #define PCL_API
00107 #define PCL_LOCAL
00108 #endif // PCL_DLL
00109
00110 #endif //#ifndef PCL_WIN32_MACROS_H_