MeshLib C# Docs
Loading...
Searching...
No Matches
MR.MeshBuilder Class Reference

Classes

class  _ByValue_MeshPiece
 This is used as a function parameter when the underlying function receives MeshPiece by value. Usage:
class  _ByValue_VertexIdentifier
 This is used as a function parameter when the underlying function receives VertexIdentifier by value. Usage:
class  _InOptConst_BuildSettings
 This is used for optional parameters of class BuildSettings with default arguments. This is only used const parameters. For non-const ones we have _InOptMut_BuildSettings. Usage:
class  _InOptConst_EqualVector3f
 This is used for optional parameters of class EqualVector3f with default arguments. This is only used const parameters. For non-const ones we have _InOptMut_EqualVector3f. Usage:
class  _InOptConst_MeshPiece
 This is used for optional parameters of class MeshPiece with default arguments. This is only used const parameters. For non-const ones we have _InOptMut_MeshPiece. Usage:
class  _InOptConst_Triangle
 This is used for optional parameters of class Triangle with default arguments. This is only used const parameters. For non-const ones we have _InOptMut_Triangle. Usage:
class  _InOptConst_UniteCloseParams
 This is used for optional parameters of class UniteCloseParams with default arguments. This is only used const parameters. For non-const ones we have _InOptMut_UniteCloseParams. Usage:
class  _InOptConst_VertDuplication
 This is used for optional parameters of class VertDuplication with default arguments. This is only used const parameters. For non-const ones we have _InOptMut_VertDuplication. Usage:
class  _InOptConst_VertexIdentifier
 This is used for optional parameters of class VertexIdentifier with default arguments. This is only used const parameters. For non-const ones we have _InOptMut_VertexIdentifier. Usage:
class  _InOptConst_VertSpan
 This is used for optional parameters of class VertSpan with default arguments. This is only used const parameters. For non-const ones we have _InOptMut_VertSpan. Usage:
class  _InOptMut_BuildSettings
 This is used for optional parameters of class BuildSettings with default arguments. This is only used mutable parameters. For const ones we have _InOptConst_BuildSettings. Usage:
class  _InOptMut_EqualVector3f
 This is used for optional parameters of class EqualVector3f with default arguments. This is only used mutable parameters. For const ones we have _InOptConst_EqualVector3f. Usage:
class  _InOptMut_MeshPiece
 This is used for optional parameters of class MeshPiece with default arguments. This is only used mutable parameters. For const ones we have _InOptConst_MeshPiece. Usage:
class  _InOptMut_Triangle
 This is used for optional parameters of class Triangle with default arguments. This is only used mutable parameters. For const ones we have _InOptConst_Triangle. Usage:
class  _InOptMut_UniteCloseParams
 This is used for optional parameters of class UniteCloseParams with default arguments. This is only used mutable parameters. For const ones we have _InOptConst_UniteCloseParams. Usage:
class  _InOptMut_VertDuplication
 This is used for optional parameters of class VertDuplication with default arguments. This is only used mutable parameters. For const ones we have _InOptConst_VertDuplication. Usage:
class  _InOptMut_VertexIdentifier
 This is used for optional parameters of class VertexIdentifier with default arguments. This is only used mutable parameters. For const ones we have _InOptConst_VertexIdentifier. Usage:
class  _InOptMut_VertSpan
 This is used for optional parameters of class VertSpan with default arguments. This is only used mutable parameters. For const ones we have _InOptConst_VertSpan. Usage:
class  BuildSettings
 Generated from class MR.MeshBuilder.BuildSettings. This is the non-const half of the class. More...
class  Const_BuildSettings
 Generated from class MR.MeshBuilder.BuildSettings. This is the const half of the class. More...
class  Const_EqualVector3f
 this makes bit-wise comparison of two Vector3f's thus making two NaNs equal Generated from class MR::MeshBuilder::equalVector3f. This is the const half of the class. More...
class  Const_MeshPiece
 a part of a whole mesh to be constructed Generated from class MR.MeshBuilder.MeshPiece. This is the const half of the class. More...
class  Const_Triangle
 mesh triangle represented by its three vertices and by its face ID Generated from class MR.MeshBuilder.Triangle. This is the const half of the class. More...
class  Const_UniteCloseParams
 Generated from class MR.MeshBuilder.UniteCloseParams. This is the const half of the class. More...
class  Const_VertDuplication
 Generated from class MR.MeshBuilder.VertDuplication. This is the const half of the class. More...
class  Const_VertexIdentifier
 this class is responsible for giving a unique id to each vertex with distinct coordinates NOTE: the points are considered non-identical if they have the same values but have zero values with different signs (e.g. (0; 0; 1) and (-0; 0; 1)) use Vector3::unsignZeroValues method to get rid of signed zero values if you're unsure of their absence Generated from class MR.MeshBuilder.VertexIdentifier. This is the const half of the class. More...
class  Const_VertSpan
 Generated from class MR.MeshBuilder.VertSpan. This is the const half of the class. More...
class  EqualVector3f
 this makes bit-wise comparison of two Vector3f's thus making two NaNs equal Generated from class MR::MeshBuilder::equalVector3f. This is the non-const half of the class. More...
class  MeshPiece
 a part of a whole mesh to be constructed Generated from class MR.MeshBuilder.MeshPiece. This is the non-const half of the class. More...
class  Triangle
 mesh triangle represented by its three vertices and by its face ID Generated from class MR.MeshBuilder.Triangle. This is the non-const half of the class. More...
class  UniteCloseParams
 Generated from class MR.MeshBuilder.UniteCloseParams. This is the non-const half of the class. More...
class  VertDuplication
 Generated from class MR.MeshBuilder.VertDuplication. This is the non-const half of the class. More...
class  VertexIdentifier
 this class is responsible for giving a unique id to each vertex with distinct coordinates NOTE: the points are considered non-identical if they have the same values but have zero values with different signs (e.g. (0; 0; 1) and (-0; 0; 1)) use Vector3::unsignZeroValues method to get rid of signed zero values if you're unsure of their absence Generated from class MR.MeshBuilder.VertexIdentifier. This is the non-const half of the class. More...
class  VertSpan
 Generated from class MR.MeshBuilder.VertSpan. This is the non-const half of the class. More...

Static Public Member Functions

static unsafe MR.MeshTopology fromTriangles (MR.Const_Triangulation t, MR.MeshBuilder.Const_BuildSettings? settings=null, MR.Std._ByValue_Function_Bool_From_Float? progressCb=null)
 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. Parameter settings defaults to {}. Parameter progressCb defaults to {}.
static unsafe nuint duplicateNonManifoldVertices (MR.Triangulation t, MR.FaceBitSet? region=null, MR.Std.Vector_MRMeshBuilderVertDuplication? dups=null, MR._InOpt_VertId lastValidVert=default)
 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 return number of duplicated vertices Generated from function MR.MeshBuilder.duplicateNonManifoldVertices. Parameter lastValidVert defaults to {}.
static unsafe MR.MeshTopology fromTrianglesDuplicatingNonManifoldVertices (MR.Triangulation t, MR.Std.Vector_MRMeshBuilderVertDuplication? dups=null, MR.MeshBuilder.Const_BuildSettings? settings=null)
 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 Generated from function MR.MeshBuilder.fromTrianglesDuplicatingNonManifoldVertices. Parameter settings defaults to {}.
static unsafe MR.Mesh fromPointTriples (MR.Std.Const_Vector_StdArrayMRVector3f3 posTriples)
 construct mesh from point triples; all coinciding points are given the same VertId in the result Generated from function MR.MeshBuilder.fromPointTriples.
static unsafe MR.MeshTopology fromDisjointMeshPieces (MR.Const_Triangulation t, MR.VertId maxVertId, MR.Std.Const_Vector_MRMeshBuilderMeshPiece pieces, MR.MeshBuilder.Const_BuildSettings? settings=null)
 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. Parameter settings defaults to {}.
static unsafe nuint addTriangles (MR.MeshTopology res, MR.Const_Triangulation t, MR.MeshBuilder.Const_BuildSettings? settings=null)
 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
static unsafe void addTriangles (MR.MeshTopology res, MR.Std.Vector_MRVertId vertTriples, MR.FaceBitSet? createdFaces=null)
 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.
static unsafe MR.MeshTopology fromFaceSoup (MR.Std.Const_Vector_MRVertId verts, MR.Const_Vector_MRMeshBuilderVertSpan_MRFaceId faces, MR.MeshBuilder.Const_BuildSettings? settings=null, MR.Std._ByValue_Function_Bool_From_Float? progressCb=null)
 construct mesh topology from face soup, where each face can have arbitrary degree (not only triangles) Generated from function MR.MeshBuilder.fromFaceSoup. Parameter settings defaults to {}. Parameter progressCb defaults to {}.
static unsafe int uniteCloseVertices (MR.Mesh mesh, float closeDist, bool? uniteOnlyBd=null, MR.VertMap? optionalVertOldToNew=null)
 the function finds groups of mesh vertices located closer to each other than
static unsafe int uniteCloseVertices (MR.Mesh mesh, MR.MeshBuilder.Const_UniteCloseParams? params_=null)
 the function finds groups of mesh vertices located closer to each other than

Member Function Documentation

◆ addTriangles() [1/2]

unsafe nuint MR.MeshBuilder.addTriangles ( MR.MeshTopology res,
MR.Const_Triangulation t,
MR.MeshBuilder.Const_BuildSettings? settings = null )
inlinestatic

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. Parameter settings defaults to {}.

◆ addTriangles() [2/2]

unsafe void MR.MeshBuilder.addTriangles ( MR.MeshTopology res,
MR.Std.Vector_MRVertId vertTriples,
MR.FaceBitSet? createdFaces = null )
inlinestatic

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.

◆ duplicateNonManifoldVertices()

unsafe nuint MR.MeshBuilder.duplicateNonManifoldVertices ( MR.Triangulation t,
MR.FaceBitSet? region = null,
MR.Std.Vector_MRMeshBuilderVertDuplication? dups = null,
MR._InOpt_VertId lastValidVert = default )
inlinestatic

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 return number of duplicated vertices Generated from function MR.MeshBuilder.duplicateNonManifoldVertices. Parameter lastValidVert defaults to {}.

◆ fromDisjointMeshPieces()

unsafe MR.MeshTopology MR.MeshBuilder.fromDisjointMeshPieces ( MR.Const_Triangulation t,
MR.VertId maxVertId,
MR.Std.Const_Vector_MRMeshBuilderMeshPiece pieces,
MR.MeshBuilder.Const_BuildSettings? settings = null )
inlinestatic

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. Parameter settings defaults to {}.

◆ fromFaceSoup()

unsafe MR.MeshTopology MR.MeshBuilder.fromFaceSoup ( MR.Std.Const_Vector_MRVertId verts,
MR.Const_Vector_MRMeshBuilderVertSpan_MRFaceId faces,
MR.MeshBuilder.Const_BuildSettings? settings = null,
MR.Std._ByValue_Function_Bool_From_Float? progressCb = null )
inlinestatic

construct mesh topology from face soup, where each face can have arbitrary degree (not only triangles) Generated from function MR.MeshBuilder.fromFaceSoup. Parameter settings defaults to {}. Parameter progressCb defaults to {}.

◆ fromPointTriples()

unsafe MR.Mesh MR.MeshBuilder.fromPointTriples ( MR.Std.Const_Vector_StdArrayMRVector3f3 posTriples)
inlinestatic

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

◆ fromTriangles()

unsafe MR.MeshTopology MR.MeshBuilder.fromTriangles ( MR.Const_Triangulation t,
MR.MeshBuilder.Const_BuildSettings? settings = null,
MR.Std._ByValue_Function_Bool_From_Float? progressCb = null )
inlinestatic

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. Parameter settings defaults to {}. Parameter progressCb defaults to {}.

◆ fromTrianglesDuplicatingNonManifoldVertices()

unsafe MR.MeshTopology MR.MeshBuilder.fromTrianglesDuplicatingNonManifoldVertices ( MR.Triangulation t,
MR.Std.Vector_MRMeshBuilderVertDuplication? dups = null,
MR.MeshBuilder.Const_BuildSettings? settings = null )
inlinestatic

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 Generated from function MR.MeshBuilder.fromTrianglesDuplicatingNonManifoldVertices. Parameter settings defaults to {}.

◆ uniteCloseVertices() [1/2]

unsafe int MR.MeshBuilder.uniteCloseVertices ( MR.Mesh mesh,
float closeDist,
bool? uniteOnlyBd = null,
MR.VertMap? optionalVertOldToNew = null )
inlinestatic

the function finds groups of mesh vertices located closer to each other than

Parameters
closeDist,andunites such vertices in one; then the mesh is rebuilt from the remaining triangles
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. Parameter uniteOnlyBd defaults to true.

◆ uniteCloseVertices() [2/2]

unsafe int MR.MeshBuilder.uniteCloseVertices ( MR.Mesh mesh,
MR.MeshBuilder.Const_UniteCloseParams? params_ = null )
inlinestatic

the function finds groups of mesh vertices located closer to each other than

Parameters
params.closeDist,andunites 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. Parameter params_ defaults to {}.

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