A class to administrate an axis coordinate system drawable in OpenGL.
Defines the mesh component: node.
Base class for triangle and quad patches.
This represents a WEMPatch consisting of triangles only.
Dynamic templated vector.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
void _performTrivialBoolOp(WEMTrianglePatch *inPatch1, WEMTrianglePatch *inPatch2, WEMTrianglePatch *outPatch, unsigned int boolOpMode, unsigned int outputMode)
If the bounding boxes of the input WEMs do not intersect, perform a trivial Boolean operation.
void _removeNonValidCuts(WEMVector< WEMFace > *intersectedFaces, WEMVector< WEMFaceCut > **faceCuts)
Removes all non-valid face cuts from the common face cuts vector.
void _boolOp(WEMTrianglePatch *inPatch1, WEMTrianglePatch *inPatch2, WEMTrianglePatch *outPatch, unsigned int boolOpMode, unsigned int outputMode, TriangulationModes triangulationMode, WEMVector< WEMCut > *cuts)
Performs a boolean operation (union, intersection, difference) on given patches.
Axis _getMinimalOverlapAxisOfBoundingBoxes(const Vector3 &min1, const Vector3 &min2, const Vector3 &max1, const Vector3 &max2)
Returns the minimal overlap axis of the given bounding boxes.
WEMVector< WEMFaceCut > ** _setupFaceCuts(WEMTrianglePatch *inPatch, WEMVector< WEMFace > *intersectedFaces, WEMVector< WEMPartialFaceCut > **partialFaceCuts)
Sets up the face cut vector.
void _classifyIntersectionAndOutsideFaces(WEMTrianglePatch *inPatch1, WEMVector< WEMFace > *intersectedFaces)
Checks all faces; if a face if fully outside, it is just marked, else it is also added to the given i...
void _resetOuterAndIntersectingFlags(WEMTrianglePatch *inPatch1, WEMTrianglePatch *inPatch2)
Resets the status flags of nodes and faces.
void _updateClassification(WEMTrianglePatch *triPatch, WEMVector< WEMFaceCut > **faceCutTable, WEMTrianglePatch *rayPatch, WEMVector< WEMFace > *outerFaces=nullptr, WEMVector< WEMFace > *innerFaces=nullptr)
Updates classification of nodes and faces based on face cuts.
bool _areWEMBoundingBoxesIntersecting(WEMPatch *wemPatch1, WEMPatch *wemPatch2)
Returns whether the bounding boxes of the given WEMs are intersecting.
MLWEM_EXPORT void difference(WEMTrianglePatch *inPatch1, WEMTrianglePatch *inPatch2, WEMTrianglePatch *outPatch, unsigned int outputMode, TriangulationModes triangulationMode, WEMVector< WEMCut > *cuts=nullptr)
Returns the difference of the given patches.
void _addFacesToOutputPatch(WEMVector< WEMFace > *faces, WEMNode **nodeTable, WEMTrianglePatch *outPatch)
Adds the given faces to the output patch.
MLWEM_EXPORT void intersect(WEMTrianglePatch *inPatch1, WEMTrianglePatch *inPatch2, WEMTrianglePatch *outPatch, unsigned int outputMode, TriangulationModes triangulationMode, WEMVector< WEMCut > *cuts=nullptr)
Returns the intersection of the given patches.
bool _intersectBoundingBoxes(WEMTrianglePatch *triPatch1, WEMTrianglePatch *triPatch2)
Intersects bounding boxes of given patches.
MLWEM_EXPORT void unify(WEMTrianglePatch *inPatch1, WEMTrianglePatch *inPatch2, WEMTrianglePatch *outPatch, unsigned int outputMode, TriangulationModes triangulationMode, WEMVector< WEMCut > *cuts=nullptr)
Returns the union of the given patches.
const unsigned int WEMSETOP_BOOLEAN_DIFFERENCE
Set operation: difference.
const unsigned int WEMSETOP_OUTPUT_SECOND
Output mode: second patch only.
const unsigned int WEMSETOP_OUTPUT_BOTH
Output mode: both patches.
const unsigned int WEMSETOP_INTERSECTING_FLAG
TriangulationModes
Enumeration of the triangulation modes. Note that these are 'mirrored' in the SoWEM part.
const unsigned int WEMSETOP_OUTER_FLAG
const unsigned int WEMSETOP_BOOLEAN_UNION
Set operation: union.
const unsigned int WEMSETOP_BOOLEAN_INTERSECTION
Set operation: intersection.
const unsigned int WEMSETOP_OUTPUT_FIRST
Output mode: first patch only.