MeVisLabToolboxReference
|
00001 // **InsertLicense** code 00002 //---------------------------------------------------------------------------------- 00005 00012 #ifndef __MLWEMIncludes_H 00013 #define __MLWEMIncludes_H 00014 00015 #include "MLWEMSystem.h" 00016 00017 #ifdef WIN32 00018 00019 # pragma warning (disable : 4018) 00020 # pragma warning (disable : 4663) 00021 # pragma warning (disable : 4018) 00022 # pragma warning (disable : 4663) 00023 # pragma warning (disable : 4100) 00024 # pragma warning (disable : 4275) 00025 # pragma warning (disable : 4786) 00026 # pragma warning (disable : 4284) 00027 # pragma warning (disable : 4146) 00028 00029 # pragma warning (push, 3) 00030 00031 # pragma warning (disable : 4710) 00032 # pragma warning (disable : 4702) 00033 00034 #endif 00035 00036 00037 #include <algorithm> 00038 #include <vector> 00039 00041 #define _PIII_CODE_ 00042 00044 const double WEM_EPSILON = 0.00001f; 00045 00047 const double WEM_LARGE_EPSILON = 0.0002f; 00048 00050 const int WEM_VERSION = 6; 00051 00053 const double WEM_GOLDEN_PERIMETER = 4.5590141139; 00054 00056 const unsigned int WEM_MAX_VALENCE = 30; 00057 00059 const unsigned int WEM_MAX_NUM_NODES = 100; 00060 00062 const double WEM_NODE_VALENCE3_THRESHOLD = 0.35f; 00063 00065 const double WEM_NODE_VALENCE3_NEIGHBORHOOD_THRESHOLD = 0.6f; 00066 00067 00068 #ifdef WIN32 00069 # pragma warning (pop) 00070 #endif 00071 00072 #include <mlModuleIncludes.h> 00073 #include <mlModule.h> 00074 00075 #define NULL_VEC Vector3(0,0,0) 00076 #define UNIT_VEC Vector3(0,1,0) 00077 00079 #define WEM_PRINT(msg){ std::cout << msg << std::endl; }; 00080 00081 #define WEM_ERROR(msg){ WEM_PRINT("WEM ERROR: " << msg << " in file " << __FILE__ << ", line: " << __LINE__); }; 00082 00083 #define WEM_WARNING(msg){ WEM_PRINT("WEM WARNING: " << msg << " in file " << __FILE__ << ", line: " << __LINE__); }; 00084 00085 #define WEM_DEBUG(msg){ WEM_PRINT("WEM Debug: " << msg << " in file " << __FILE__ << ", line: " << __LINE__); }; 00086 00088 #define NORMALIZE_VECTOR3(v) v.normalize() 00089 00090 #include <fstream> 00091 #include <mlUnicode.h> 00092 00093 ML_START_NAMESPACE 00094 00096 00098 enum WEMNotificationType 00099 { 00100 WEM_NOTIFICATION_NONE = 0, 00101 WEM_NOTIFICATION_SELECTION = 1, 00102 WEM_NOTIFICATION_FINISHED = 2, 00103 WEM_NOTIFICATION_REPAINT = 4, 00104 WEM_NOTIFICATION_INTERACTION_INIT = 8 00105 }; 00106 00108 00110 const int WEM_PATCH_ID_ALL = -1; 00111 00113 00115 enum ColorModes 00116 { 00117 WEM_COLOR_GENERAL = 0, 00118 WEM_COLOR_NODE_COLORS = 1, 00119 WEM_COLOR_LUT_VALUES = 2, 00120 WEM_COLOR_LUT_VALUES_INTEGER = 3, 00121 WEM_COLOR_TEXTURED = 4, 00122 WEM_COLOR_NONE = 5 00123 }; 00124 00126 00128 enum NodeRenderingModes 00129 { 00130 WEM_NODE_RENDERING_NORMAL = 0, 00131 WEM_NODE_RENDERING_HIGH = 1, 00132 WEM_NODE_RENDERING_EXTRA_HIGH = 2 00133 }; 00134 00136 00138 enum BoundingBoxModes 00139 { 00140 WEM_BOUNDING_BOX_AXIS_ALIGNED = 0, 00141 WEM_BOUNDING_BOX_OBJECT_ALIGNED = 1 00142 }; 00143 00145 00147 enum TriangulationModes 00148 { 00149 WEM_TRIANGULATION_CENTER = 0, 00150 WEM_TRIANGULATION_FAN = 1, 00151 WEM_TRIANGULATION_STRIP = 2, 00152 WEM_TRIANGULATION_SPIDERWEB = 3 00153 }; 00154 00156 00158 enum PatchTypes 00159 { 00160 WEM_PATCH_UNKNOWN = 0, 00161 WEM_PATCH_TRIANGLES = 1, 00162 WEM_PATCH_QUADS = 2, 00163 WEM_PATCH_POLYGONS = 3 00164 }; 00165 00167 00169 enum PrimitiveValueListTypes 00170 { 00171 WEM_PRIMITIVE_VALUE_LIST_NODE = 0, 00172 WEM_PRIMITIVE_VALUE_LIST_EDGE = 1, 00173 WEM_PRIMITIVE_VALUE_LIST_FACE = 2 00174 }; 00175 00177 00179 enum OrientationTypes 00180 { 00181 WEM_ORIENTATION_UNKNOWN = 0, 00182 WEM_ORIENTATION_OUTWARD = 1, 00183 WEM_ORIENTATION_INWARD = 2 00184 }; 00185 00187 00188 ML_END_NAMESPACE 00189 00190 #endif // __MLWEMIncludes_H 00191