MeVisLab Toolbox Reference
WEMEdgeOp.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #pragma once
14 
15 #include "WEMBase/WEM.h"
16 
19 
20 ML_START_NAMESPACE
21 
23 
27 namespace WEMEdgeOp
28 {
31 
33  MLWEM_EXPORT bool checkSwap(WEMTrianglePatch* triPatch, WEMEdge* edge, void* heap=nullptr, float maxDihedralAngleNeigh=0.99999331899f);
35  MLWEM_EXPORT bool performSwap(WEMTrianglePatch* triPatch, WEMEdge* edge, void* heap=nullptr, float maxDihedralAngleNeigh=0.99999331899f);
36 
38  MLWEM_EXPORT bool checkSplit(WEMTrianglePatch* triPatch, WEMEdge* edge, void* heap=nullptr, float maxEdgeLength=1.0f);
40  MLWEM_EXPORT WEMNode* performSplit(WEMTrianglePatch* triPatch, WEMEdge* edge, void* heap=nullptr, float maxEdgeLength=1.0f);
41 
44  MLWEM_EXPORT bool checkCollapse(WEMTrianglePatch* triPatch, WEMEdge* edge, void* heap=nullptr, float maxDihedralAngleNeigh=0.99999331899f);
46  MLWEM_EXPORT WEMNode* performCollapse(WEMTrianglePatch* triPatch, WEMEdge* edge, void* heap=nullptr, float maxDihedralAngleNeigh=0.99999331899f);
47 
49  MLWEM_EXPORT void deleteTetrahedron(WEMTrianglePatch* triPatch, WEMNode* node, void* heap=nullptr);
51  MLWEM_EXPORT bool deleteNodeWithValenceThree(WEMTrianglePatch* triPatch, WEMNode* node, void* heap=nullptr, float maxDihedralAngleNeigh=0.99999331899f);
54 };
55 
57 
58 ML_END_NAMESPACE
#define MLWEM_EXPORT
Definition: MLWEMSystem.h:18
Defines the mesh component: edge.
Definition: WEMEdge.h:30
Defines the mesh component: node.
Definition: WEMNode.h:33
This represents a WEMPatch consisting of triangles only.
MLWEM_EXPORT WEMNode * performCollapse(WEMTrianglePatch *triPatch, WEMEdge *edge, void *heap=nullptr, float maxDihedralAngleNeigh=0.99999331899f)
Performs a collapsing of the given edge in a triangle patch and returns the inserted node.
MLWEM_EXPORT void deleteTetrahedron(WEMTrianglePatch *triPatch, WEMNode *node, void *heap=nullptr)
Deletes a tetrahedron constellation where the given node is part of.
MLWEM_EXPORT bool checkSwap(WEMTrianglePatch *triPatch, WEMEdge *edge, void *heap=nullptr, float maxDihedralAngleNeigh=0.99999331899f)
Returns whether the given edge of the triangle patch can be swapped.
MLWEM_EXPORT bool performSwap(WEMTrianglePatch *triPatch, WEMEdge *edge, void *heap=nullptr, float maxDihedralAngleNeigh=0.99999331899f)
Performs a swapping of the edge in a triangle patch. Returns whether a swapping was performed.
MLWEM_EXPORT bool checkSplit(WEMTrianglePatch *triPatch, WEMEdge *edge, void *heap=nullptr, float maxEdgeLength=1.0f)
Returns whether the given edge of the triangle patch can be split.
MLWEM_EXPORT WEMNode * performSplit(WEMTrianglePatch *triPatch, WEMEdge *edge, void *heap=nullptr, float maxEdgeLength=1.0f)
Performs a splitting of the edge in a triangle patch. Returns the node which has been inserted.
MLWEM_EXPORT bool deleteNodeWithValenceThree(WEMTrianglePatch *triPatch, WEMNode *node, void *heap=nullptr, float maxDihedralAngleNeigh=0.99999331899f)
Deletes a node with a valence of 3. Returns whether the operation was successful.
MLWEM_EXPORT bool isWellFormed(WEMEdge *edge)
Perform a basic sanity check.
MLWEM_EXPORT bool checkCollapse(WEMTrianglePatch *triPatch, WEMEdge *edge, void *heap=nullptr, float maxDihedralAngleNeigh=0.99999331899f)
Returns whether the given edge in the triangle patch can be collapsed.
MLWEM_EXPORT bool areCollinear(WEMNode *n0, WEMNode *n1, WEMNode *n2)
Returns whether the given positions are collinear, assuming that n0 is always in the middle.