MeshLib Java Docs
Loading...
Searching...
No Matches
meshlib.meshbuilder.Functions Class Reference

Static Public Member Functions

static long duplicateNonManifoldVertices (meshlib.Triangulation t, meshlib.FaceBitSet region, meshlib.std_vector_MR_MeshBuilder_VertDuplication dups, meshlib.VertId lastValidVert, meshlib.std_function_bool_from_MR_VertId_MR_VertId_MR_VertId_MR_VertId_MR_VertId betterCont)
static boolean opLess (meshlib.meshbuilder.VertTri l, meshlib.meshbuilder.VertTri r)
static meshlib.meshbuilder.VertInfo inspectVertNeighbourhood (meshlib.Triangulation t, meshlib.meshbuilder.VertTri begin, meshlib.meshbuilder.VertTri end)
static meshlib.MeshTopology fromTriangles (meshlib.Triangulation t, meshlib.meshbuilder.BuildSettings settings, meshlib.std_function_bool_from_float progressCb)
static meshlib.MeshTopology fromTrianglesDuplicatingNonManifoldVertices (meshlib.Triangulation t, meshlib.std_vector_MR_MeshBuilder_VertDuplication dups, meshlib.meshbuilder.BuildSettings settings, meshlib.std_function_bool_from_MR_VertId_MR_VertId_MR_VertId_MR_VertId_MR_VertId betterCont)
static meshlib.Mesh fromPointTriples (meshlib.std_vector_std_array_MR_Vector3f_3 posTriples)
static meshlib.MeshTopology fromDisjointMeshPieces (meshlib.Triangulation t, meshlib.VertId maxVertId, meshlib.std_vector_MR_MeshBuilder_MeshPiece pieces, meshlib.meshbuilder.BuildSettings settings)
static long addTriangles (meshlib.MeshTopology res, meshlib.Triangulation t, meshlib.meshbuilder.BuildSettings settings)
static void addTriangles (meshlib.MeshTopology res, meshlib.std_vector_MR_VertId vertTriples, meshlib.FaceBitSet createdFaces)
static meshlib.MeshTopology fromFaceSoup (meshlib.std_vector_MR_VertId verts, meshlib.Vector_MR_MeshBuilder_VertSpan_MR_FaceId faces, meshlib.meshbuilder.BuildSettings settings, meshlib.std_function_bool_from_float progressCb)
static meshlib.std_vector_int computeTrianglesRepetitions (meshlib.Triangulation t)
static int uniteCloseVertices (meshlib.Mesh mesh, float closeDist, java.lang.Boolean uniteOnlyBd, meshlib.VertMap optionalVertOldToNew)
static int uniteCloseVertices (meshlib.Mesh mesh, meshlib.meshbuilder.UniteCloseParams params)

Detailed Description

The free functions of this namespace.

Member Function Documentation

◆ addTriangles() [1/2]

void meshlib.meshbuilder.Functions.addTriangles ( meshlib.MeshTopology res,
meshlib.std_vector_MR_VertId vertTriples,
meshlib.FaceBitSet createdFaces )
static

adds triangles in the existing topology, auto selecting face ids for them; vertTriples on output contain the remaining triangles that could not be added into the topology right now, but may be added later when other triangles appear in the mesh Generated from function MR::MeshBuilder::addTriangles.

Calls MR_MeshBuilder_addTriangles_std_vector_MR_VertId().

◆ addTriangles() [2/2]

long meshlib.meshbuilder.Functions.addTriangles ( meshlib.MeshTopology res,
meshlib.Triangulation t,
meshlib.meshbuilder.BuildSettings settings )
static

adds triangles in the existing topology, given face indecies must be free; settings.region on output contain the remaining triangles that could not be added into the topology right now, but may be added later when other triangles appear in the mesh

Returns
the total number of triangles added in the topology Generated from function MR::MeshBuilder::addTriangles.

Calls MR_MeshBuilder_addTriangles_MR_Triangulation().

◆ computeTrianglesRepetitions()

meshlib.std_vector_int meshlib.meshbuilder.Functions.computeTrianglesRepetitions ( meshlib.Triangulation t)
static

computes the histogram of triangle repetitions in given triangulation, ignoring vertex order in each triangle: res[0] is the number of triangles without duplicates, res[1] is the number of distinct triangles present in two copies, res[2] is the number of distinct triangles present in three copies, etc. Generated from function MR::MeshBuilder::computeTrianglesRepetitions.

Calls MR_MeshBuilder_computeTrianglesRepetitions().

◆ duplicateNonManifoldVertices()

long meshlib.meshbuilder.Functions.duplicateNonManifoldVertices ( meshlib.Triangulation t,
meshlib.FaceBitSet region,
meshlib.std_vector_MR_MeshBuilder_VertDuplication dups,
meshlib.VertId lastValidVert,
meshlib.std_function_bool_from_MR_VertId_MR_VertId_MR_VertId_MR_VertId_MR_VertId betterCont )
static

resolve non-manifold vertices by creating duplicate vertices in the triangulation (which is modified) lastValidVert is needed if region or t does not contain full mesh, then first duplicated vertex will have lastValidVert+1 index dups (if given) contents will be ignored and overridden; it receives the duplications in creation order with consecutive dupVert ids starting from lastValidVert+1 betterCont (if given) selects the best triangle among several possible path continuations return number of duplicated vertices Generated from function MR::MeshBuilder::duplicateNonManifoldVertices.

Calls MR_MeshBuilder_duplicateNonManifoldVertices().

◆ fromDisjointMeshPieces()

meshlib.MeshTopology meshlib.meshbuilder.Functions.fromDisjointMeshPieces ( meshlib.Triangulation t,
meshlib.VertId maxVertId,
meshlib.std_vector_MR_MeshBuilder_MeshPiece pieces,
meshlib.meshbuilder.BuildSettings settings )
static

construct mesh topology in parallel from given disjoint mesh pieces (which do not have any shared vertex) and some additional triangles (in settings) that join the pieces Generated from function MR::MeshBuilder::fromDisjointMeshPieces.

Calls MR_MeshBuilder_fromDisjointMeshPieces().

◆ fromFaceSoup()

construct mesh topology from face soup, where each face can have arbitrary degree (not only triangles) Generated from function MR::MeshBuilder::fromFaceSoup.

Calls MR_MeshBuilder_fromFaceSoup().

◆ fromPointTriples()

meshlib.Mesh meshlib.meshbuilder.Functions.fromPointTriples ( meshlib.std_vector_std_array_MR_Vector3f_3 posTriples)
static

construct mesh from point triples; all coinciding points are given the same VertId in the result Generated from function MR::MeshBuilder::fromPointTriples.

Calls MR_MeshBuilder_fromPointTriples().

◆ fromTriangles()

meshlib.MeshTopology meshlib.meshbuilder.Functions.fromTriangles ( meshlib.Triangulation t,
meshlib.meshbuilder.BuildSettings settings,
meshlib.std_function_bool_from_float progressCb )
static

construct mesh topology from a set of triangles with given ids; if skippedTris is given then it receives all input triangles not added in the resulting topology Generated from function MR::MeshBuilder::fromTriangles.

Calls MR_MeshBuilder_fromTriangles().

◆ fromTrianglesDuplicatingNonManifoldVertices()

construct mesh topology from a set of triangles with given ids; unlike simple fromTriangles() it tries to resolve non-manifold vertices by creating duplicate vertices; triangulation is modified to introduce duplicates; betterCont (if given) selects the best triangle among several possible continuations during the duplication Generated from function MR::MeshBuilder::fromTrianglesDuplicatingNonManifoldVertices.

Calls MR_MeshBuilder_fromTrianglesDuplicatingNonManifoldVertices().

◆ inspectVertNeighbourhood()

meshlib.meshbuilder.VertInfo meshlib.meshbuilder.Functions.inspectVertNeighbourhood ( meshlib.Triangulation t,
meshlib.meshbuilder.VertTri begin,
meshlib.meshbuilder.VertTri end )
static

computes VertInfo of one vertex given all its incident triangles in [begin, end), all referencing the same vertex; allocates temporary hash maps on every call, so prefer batch processing over calling it per vertex of a large mesh Generated from function MR::MeshBuilder::inspectVertNeighbourhood.

Calls MR_MeshBuilder_inspectVertNeighbourhood().

◆ opLess()

boolean meshlib.meshbuilder.Functions.opLess ( meshlib.meshbuilder.VertTri l,
meshlib.meshbuilder.VertTri r )
static

Generated from function MR::MeshBuilder::operator<.

Calls MR_less_MR_MeshBuilder_VertTri().

◆ uniteCloseVertices() [1/2]

int meshlib.meshbuilder.Functions.uniteCloseVertices ( meshlib.Mesh mesh,
float closeDist,
java.lang.Boolean uniteOnlyBd,
meshlib.VertMap optionalVertOldToNew )
static

the function finds groups of mesh vertices located closer to each other than closeDist, and unites such vertices in one; then the mesh is rebuilt from the remaining triangles

Parameters
optionalVertOldToNewis the mapping of vertices: before -> after
uniteOnlyBdif true then only boundary vertices can be united, all internal vertices (even close ones) will remain
Returns
the number of vertices united, 0 means no change in the mesh Generated from function MR::MeshBuilder::uniteCloseVertices.

Calls MR_MeshBuilder_uniteCloseVertices_dist().

◆ uniteCloseVertices() [2/2]

int meshlib.meshbuilder.Functions.uniteCloseVertices ( meshlib.Mesh mesh,
meshlib.meshbuilder.UniteCloseParams params )
static

the function finds groups of mesh vertices located closer to each other than params.closeDist, and unites such vertices in one; then the mesh is rebuilt from the remaining triangles

Returns
the number of vertices united, 0 means no change in the mesh Generated from function MR::MeshBuilder::uniteCloseVertices.

Calls MR_MeshBuilder_uniteCloseVertices().


The documentation for this class was generated from the following file: