SPH
Functions
Mesh.cpp File Reference
#include "post/Mesh.h"
#include "objects/finders/Order.h"
#include <map>
#include <set>

Go to the source code of this file.

Functions

NAMESPACE_SPH_BEGIN std::pair< int, int > makeEdge (const int i1, const int i2)
 
bool isMeshClosed (const Mesh &mesh)
 Checks if the mesh represents a single closed surface. More...
 
void refineMesh (Mesh &mesh)
 Improves mesh quality using edge flips (valence equalization) and tangential relaxation. More...
 
void subdivideMesh (Mesh &mesh)
 Subdivides all triangles of the mesh using 1-4 scheme. More...
 
Mesh getMeshFromTriangles (ArrayView< const Triangle > triangles, const Float eps)
 Converts array of triangles into a mesh. More...
 
Array< TrianglegetTrianglesFromMesh (const Mesh &mesh)
 Expands the mesh into an array of triangles. More...
 

Function Documentation

◆ getMeshFromTriangles()

Mesh getMeshFromTriangles ( ArrayView< const Triangle triangles,
const Float  eps 
)

Converts array of triangles into a mesh.

The mesh contains a set of unique vertices and faces as indices into the vertex array.

Parameters
trianglesInput array of triangles.
epsTolerancy for two vertices to be considered equal.

Definition at line 83 of file Mesh.cpp.

◆ getTrianglesFromMesh()

Array<Triangle> getTrianglesFromMesh ( const Mesh mesh)

Expands the mesh into an array of triangles.

Definition at line 169 of file Mesh.cpp.

◆ isMeshClosed()

bool isMeshClosed ( const Mesh mesh)

Checks if the mesh represents a single closed surface.

Todo:
or invalid (edge shared by >2 faces)

Definition at line 12 of file Mesh.cpp.

◆ makeEdge()

NAMESPACE_SPH_BEGIN std::pair<int, int> makeEdge ( const int  i1,
const int  i2 
)
inline

Definition at line 8 of file Mesh.cpp.

◆ refineMesh()

void refineMesh ( Mesh mesh)

Improves mesh quality using edge flips (valence equalization) and tangential relaxation.

Definition at line 29 of file Mesh.cpp.

◆ subdivideMesh()

void subdivideMesh ( Mesh mesh)

Subdivides all triangles of the mesh using 1-4 scheme.

Definition at line 56 of file Mesh.cpp.