52 inline unsigned int getNumFaces()
const override {
return _triangles.num(); }
61 inline WEMFace*
getFaceAt(
unsigned int index)
override {
return _triangles.at(index); }
Defines the mesh component: face.
Dynamic vector, based on a memory pool. Keeps track on entry numbers of stored primitives.
Defines the mesh component: an face holding a list of up to 100 indices.
Defines the mesh component: node.
Base class for triangle and quad patches.
This represents a WEMPatch consisting of triangles only.
virtual void dispose()
Disposes of internal data structures.
void removeNodeFromPatch(WEMNode *node)
Removes the given node from this patch.
bool deleteNodeWithValenceThree(WEMNode *node)
Deletes a single node with a valence of three.
const WEMTriangle * getTriangleAt(unsigned int index) const
Returns the WEMTriangle at the given index.
friend bool MLWEM_EXPORT operator!=(const WEMTrianglePatch &x, const WEMTrianglePatch &y)
Operator for not equality.
WEMTrianglePatch(unsigned int bs=8192)
Standard constructor.
const WEMIndexVector< WEMTriangle > * getFaces() const
Returns the pointer to the internal faces structure.
WEMFace * addFace() override
Instantiates a new WEMTriangle and adds it to the internal faces vector. Returns a pointer to this ne...
void sortFacesByZPosition() override
Sorts the faces by the z-position of their centroids.
WEMTrianglePatch(WEMTrianglePatch &&other) noexcept
Move c'tor.
WEMFace * getFaceAt(unsigned int index) override
Returns the face at the given index.
unsigned int getNumFaces() const override
Returns the number of faces in the patch.
WEMTriangle * addTriangleNoUpdatePrimitiveValueLists()
Creates and adds a triangle to the internal faces vector. Returns a pointer to this new face.
WEMTrianglePatch(const WEMTrianglePatch &wemPatch)
Copy constructor.
~WEMTrianglePatch() override=default
Standard destructor.
WEMTrianglePatch(WEM *wem, unsigned int bs=8192)
Constructor which takes a pointer to the WEM this WEMPatch is in.
WEMPatch * copy() override
Create a (deep) copy of the patch.
void deleteNodesWithValenceThree()
Deletes all nodes with a valence of three.
WEMIndexVector< WEMTriangle > * getFaces()
Returns the pointer to the internal faces structure.
void deleteTetrahedron(WEMNode *node)
Deletes a tetrahedron.
void convertIndexedFace(WEMIndexedFace *indexedFace, TriangulationModes triangulationMode)
Adds the given indexed face to this patch.
void delTriangle(WEMTriangle *triangle)
Deletes a triangle and erases it from the internal faces vector.
WEMTriangle * getTriangleAt(unsigned int index)
Returns the WEMTriangle at the given index.
friend bool MLWEM_EXPORT operator==(const WEMTrianglePatch &x, const WEMTrianglePatch &y)
Operator for equality.
WEMTriangle * addTriangle()
Instantiates a new WEMTriangle and adds it to the internal faces vector.
WEMTrianglePatch & operator=(WEMTrianglePatch &&other) noexcept
Move assignment operator.
PatchTypes getPatchType() const override
Returns the mesh type.
const WEMFace * getFaceAt(unsigned int index) const override
Returns the face at the given index.
Defines the mesh component: triangle.
A WEM comprises a number of WEMPatches.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
TriangulationModes
Enumeration of the triangulation modes. Note that these are 'mirrored' in the SoWEM part.
PatchTypes
Enumeration of mesh types.
@ WEM_PATCH_TRIANGLES
Patch type: all faces are triangles.