MeVisLabToolboxReference
MeVisLab/Standard/Sources/ML/MLWEM/WEMTools/WEMGeometry/WEMSetOp.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //----------------------------------------------------------------------------------
00004 
00011 #ifndef __WEMSetOp_H
00012 #define __WEMSetOp_H
00013 
00014 #include "WEMTools/WEMToolsIncludes.h"
00015 #include "WEMTools/WEMCutOp/WEMCutOp.h"
00016 
00017 ML_START_NAMESPACE
00018 
00020 
00021 const unsigned int WEMSETOP_OUTPUT_FIRST   = 0; 
00022 const unsigned int WEMSETOP_OUTPUT_SECOND  = 1; 
00023 const unsigned int WEMSETOP_OUTPUT_BOTH    = 2; 
00024 
00026 
00027 const unsigned int WEMSETOP_BOOLEAN_UNION        = 0; 
00028 const unsigned int WEMSETOP_BOOLEAN_INTERSECTION = 1; 
00029 const unsigned int WEMSETOP_BOOLEAN_DIFFERENCE   = 2; 
00030 
00032 
00034 namespace WEMSetOp 
00035 {
00037   MLWEM_EXPORT void unify(WEMTrianglePatch* inPatch1,
00038                     WEMTrianglePatch* inPatch2,
00039                     WEMTrianglePatch* outPatch,
00040                     unsigned int outputMode,
00041                     TriangulationModes triangulationMode,
00042                     WEMVector<WEMCut>* cuts=NULL);
00043 
00045   MLWEM_EXPORT void intersect(WEMTrianglePatch* inPatch1,
00046                         WEMTrianglePatch* inPatch2,
00047                         WEMTrianglePatch* outPatch,
00048                         unsigned int outputMode,
00049                         TriangulationModes triangulationMode,
00050                         WEMVector<WEMCut>* cuts=NULL);
00051 
00053   MLWEM_EXPORT void difference(WEMTrianglePatch* inPatch1,
00054                          WEMTrianglePatch* inPatch2,
00055                          WEMTrianglePatch* outPatch,
00056                          unsigned int outputMode,
00057                          TriangulationModes triangulationMode,
00058                          WEMVector<WEMCut>* cuts=NULL);
00059 
00060   // Not exporting the methods below to simulate their former private state
00061 
00063   void _boolOp(WEMTrianglePatch* inPatch1,
00064                       WEMTrianglePatch* inPatch2,
00065                       WEMTrianglePatch* outPatch,
00066                       unsigned int boolOpMode,
00067                       unsigned int outputMode,
00068                       TriangulationModes triangulationMode,
00069                       WEMVector<WEMCut>* cuts);
00070   
00074   bool _intersectBoundingBoxes(WEMTrianglePatch* triPatch1,
00075                                       WEMTrianglePatch* triPatch2,
00076                                       unsigned int outerFlag,
00077                                       unsigned int intersectingFlag);
00078 
00080   void _updateClassification(WEMTrianglePatch* triPatch,
00081                                     WEMVector<WEMFaceCut> **faceCutTable,
00082                                     unsigned int outerFlag,
00083                                     unsigned int intersectingFlag,
00084                                     WEMTrianglePatch* rayPatch,
00085                                     WEMVector<WEMFace> *outerFaces=NULL,
00086                                     WEMVector<WEMFace> *innerFaces=NULL);
00087 };
00088 
00090 
00091 ML_END_NAMESPACE
00092 
00093 #endif // __WEMGeometry_H