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

Mesh Topology Generated from class MR.MeshTopology. This is the non-const half of the class. More...

Inheritance diagram for MR.MeshTopology:

Public Member Functions

unsafe MeshTopology ()
 Constructs an empty (default-constructed) instance.
unsafe MeshTopology (MR._ByValue_MeshTopology _other)
 Generated from constructor MR.MeshTopology.MeshTopology.
 MeshTopology (Const_MeshTopology _other)
 Generated from constructor MR.MeshTopology.MeshTopology.
 MeshTopology (MeshTopology _other)
 Generated from constructor MR.MeshTopology.MeshTopology.
unsafe MR.MeshTopology assign (MR._ByValue_MeshTopology _other)
 Generated from method MR::MeshTopology::operator=.
unsafe MR.EdgeId makeEdge ()
 creates an edge not associated with any vertex or face Generated from method MR.MeshTopology.makeEdge.
unsafe void edgeReserve (ulong newCapacity)
 sets the capacity of half-edges vector Generated from method MR.MeshTopology.edgeReserve.
unsafe void shrinkToFit ()
 requests the removal of unused capacity Generated from method MR.MeshTopology.shrinkToFit.
unsafe void splice (MR.EdgeId a, MR.EdgeId b)
 given two half edges do either of two: 1) if a and b were from distinct rings, puts them in one ring; 2) if a and b were from the same ring, puts them in separate rings; the cut in rings in both cases is made after a and b Generated from method MR.MeshTopology.splice.
unsafe MR.EdgeId collapseEdge (MR.EdgeId e, MR.Std.Const_Function_Void_From_MREdgeId_MREdgeId onEdgeDel)
 collapses given edge in a vertex and deletes 1) faces: left( e ) and right( e ); 2) edges: e, next( e.sym() ), prev( e.sym() ), and optionally next( e ), prev( e ) if their left and right triangles are deleted; 3) all vertices that lost their last edge; calls onEdgeDel for every deleted edge (del) including given (e); if valid (rem) is given then dest( del ) = dest( rem ) and their origins are in different ends of collapsing edge, (rem) shall take the place of (del)
unsafe void setOrg (MR.EdgeId a, MR.VertId v)
 sets new origin to the full origin ring including this edge; edgePerVertex_ table is updated accordingly Generated from method MR.MeshTopology.setOrg.
unsafe void setLeft (MR.EdgeId a, MR.FaceId f)
 sets new left face to the full left ring including this edge; edgePerFace_ table is updated accordingly Generated from method MR.MeshTopology.setLeft.
unsafe MR.VertId addVertId ()
 creates new vert-id not associated with any edge yet Generated from method MR.MeshTopology.addVertId.
unsafe void vertResize (ulong newSize)
 explicitly increases the size of vertices vector Generated from method MR.MeshTopology.vertResize.
unsafe void vertResizeWithReserve (ulong newSize)
 explicitly increases the size of vertices vector, doubling the current capacity if it was not enough Generated from method MR.MeshTopology.vertResizeWithReserve.
unsafe void vertReserve (ulong newCapacity)
 sets the capacity of vertices vector Generated from method MR.MeshTopology.vertReserve.
unsafe MR.FaceId addFaceId ()
 creates new face-id not associated with any edge yet Generated from method MR.MeshTopology.addFaceId.
unsafe void deleteFace (MR.FaceId f, MR.Const_UndirectedEdgeBitSet? keepEdges=null)
 deletes the face, also deletes its edges and vertices if they were not shared by other faces and not in
unsafe void deleteFaces (MR.Const_FaceBitSet fs, MR.Const_UndirectedEdgeBitSet? keepEdges=null)
 deletes multiple given faces by calling deleteFace for each Generated from method MR.MeshTopology.deleteFaces.
unsafe void faceResize (ulong newSize)
 explicitly increases the size of faces vector Generated from method MR.MeshTopology.faceResize.
unsafe void faceResizeWithReserve (ulong newSize)
 explicitly increases the size of faces vector, doubling the current capacity if it was not enough Generated from method MR.MeshTopology.faceResizeWithReserve.
unsafe void faceReserve (ulong newCapacity)
 sets the capacity of faces vector Generated from method MR.MeshTopology.faceReserve.
unsafe void flipEdge (MR.EdgeId e)
 given the edge with left and right triangular faces, which form together a quadrangle, rotates the edge counter-clockwise inside the quadrangle Generated from method MR.MeshTopology.flipEdge.
unsafe MR.EdgeId splitEdge (MR.EdgeId e, MR.FaceBitSet? region=null, MR.Phmap.FlatHashMap_MRFaceId_MRFaceId? new2Old=null)
 split given edge on two parts: dest(returned-edge) = org(e) - newly created vertex, org(returned-edge) = org(e-before-split), dest(e) = dest(e-before-split)
unsafe MR.VertId splitFace (MR.FaceId f, MR.FaceBitSet? region=null, MR.Phmap.FlatHashMap_MRFaceId_MRFaceId? new2Old=null)
 split given triangle on three triangles, introducing new vertex (which is returned) inside original triangle and connecting it to its vertices
unsafe void flipOrientation (MR.Const_UndirectedEdgeBitSet? fullComponents=null)
 flip orientation (normals) of
unsafe void addPart (MR.Const_MeshTopology from, MR.Const_PartMapping? map=null, bool? rearrangeTriangles=null)
 appends mesh topology (from) in addition to the current topology: creates new edges, faces, verts;
unsafe void addPart (MR.Const_MeshTopology from, MR.FaceMap? outFmap=null, MR.VertMap? outVmap=null, MR.WholeEdgeMap? outEmap=null, bool? rearrangeTriangles=null)
 Generated from method MR.MeshTopology.addPart. Parameter rearrangeTriangles defaults to false.
unsafe void addPartByMask (MR.Const_MeshTopology from, MR.Const_FaceBitSet? fromFaces, MR.Const_PartMapping? map=null)
 the same but copies only portion of (from) specified by fromFaces, Generated from method MR.MeshTopology.addPartByMask. Parameter map defaults to {}.
unsafe void addPartByMask (MR.Const_MeshTopology from, MR.Const_FaceBitSet? fromFaces, bool? flipOrientation=null, MR.Std.Const_Vector_StdVectorMREdgeId? thisContours=null, MR.Std.Const_Vector_StdVectorMREdgeId? fromContours=null, MR.Const_PartMapping? map=null)
 this version has more parameters
unsafe void rotateTriangles ()
 for each triangle selects edgeWithLeft with minimal origin vertex Generated from method MR.MeshTopology.rotateTriangles.
unsafe void pack (MR.FaceMap? outFmap=null, MR.VertMap? outVmap=null, MR.WholeEdgeMap? outEmap=null, bool? rearrangeTriangles=null)
 tightly packs all arrays eliminating lone edges and invalid faces and vertices
unsafe void pack (MR.Const_PackMapping map)
 tightly packs all arrays eliminating lone edges and invalid faces and vertices; reorder all faces, vertices and edges according to given maps, each containing old id -> new id mapping Generated from method MR.MeshTopology.pack.
unsafe void packMinMem (MR.Const_PackMapping map)
 tightly packs all arrays eliminating lone edges and invalid faces and vertices; reorder all faces, vertices and edges according to given maps, each containing old id -> new id mapping; unlike pack method, this method allocates minimal amount of memory for its operation but works much slower Generated from method MR.MeshTopology.packMinMem.
unsafe void read (MR.Std.Istream s, MR.Std._ByValue_Function_Bool_From_Float? callback=null)
 loads from binary stream
unsafe void resizeBeforeParallelAdd (ulong edgeSize, ulong vertSize, ulong faceSize)
 These function are for parallel mesh creation from different threads. If you are not sure, do not use them.
unsafe void addPackedPart (MR.Const_MeshTopology from, MR.EdgeId toEdgeId, MR.Const_FaceMap fmap, MR.Const_VertMap vmap)
 copies topology (from) into this;
unsafe bool computeValidsFromEdges (MR.Std._ByValue_Function_Bool_From_Float? cb=null)
 compute 1) numValidVerts_ and validVerts_ from edgePerVertex_ 2) numValidFaces_ and validFaces_ from edgePerFace_ and activates their auto-update Generated from method MR.MeshTopology.computeValidsFromEdges. Parameter cb defaults to {}.
unsafe void stopUpdatingValids ()
 stops updating validVerts(), validFaces(), numValidVerts(), numValidFaces() for parallel processing of mesh parts Generated from method MR.MeshTopology.stopUpdatingValids.
unsafe void preferEdges (MR.Const_UndirectedEdgeBitSet stableEdges)
 for incident vertices and faces of given edges, remember one of them as edgeWithOrg and edgeWithLeft; this is important in parallel algorithms where other edges may change but stable ones will survive Generated from method MR.MeshTopology.preferEdges.
unsafe bool buildGridMesh (MR.Const_GridSettings settings, MR.Std._ByValue_Function_Bool_From_Float? cb=null)
 Generated from method MR.MeshTopology.buildGridMesh. Parameter cb defaults to {}.
Public Member Functions inherited from MR.Const_MeshTopology
virtual void Dispose ()
unsafe Const_MeshTopology ()
 Constructs an empty (default-constructed) instance.
unsafe Const_MeshTopology (MR._ByValue_MeshTopology _other)
 Generated from constructor MR.MeshTopology.MeshTopology.
 Const_MeshTopology (Const_MeshTopology _other)
 Generated from constructor MR.MeshTopology.MeshTopology.
 Const_MeshTopology (MeshTopology _other)
 Generated from constructor MR.MeshTopology.MeshTopology.
unsafe bool isLoneEdge (MR.EdgeId a)
 checks whether the edge is disconnected from all other edges and disassociated from all vertices and faces (as if after makeEdge) Generated from method MR.MeshTopology.isLoneEdge.
unsafe MR.UndirectedEdgeId lastNotLoneUndirectedEdge ()
 returns last not lone undirected edge id, or invalid id if no such edge exists Generated from method MR.MeshTopology.lastNotLoneUndirectedEdge.
unsafe MR.EdgeId lastNotLoneEdge ()
 returns last not lone edge id, or invalid id if no such edge exists Generated from method MR.MeshTopology.lastNotLoneEdge.
unsafe void excludeLoneEdges (MR.UndirectedEdgeBitSet edges)
 remove all lone edges from given set Generated from method MR.MeshTopology.excludeLoneEdges.
unsafe ulong edgeSize ()
 returns the number of half-edge records including lone ones Generated from method MR.MeshTopology.edgeSize.
unsafe ulong edgeCapacity ()
 returns the number of allocated edge records Generated from method MR.MeshTopology.edgeCapacity.
unsafe ulong undirectedEdgeSize ()
 returns the number of undirected edges (pairs of half-edges) including lone ones Generated from method MR.MeshTopology.undirectedEdgeSize.
unsafe ulong undirectedEdgeCapacity ()
 returns the number of allocated undirected edges (pairs of half-edges) Generated from method MR.MeshTopology.undirectedEdgeCapacity.
unsafe ulong computeNotLoneUndirectedEdges ()
 computes the number of not-lone (valid) undirected edges Generated from method MR.MeshTopology.computeNotLoneUndirectedEdges.
unsafe MR.UndirectedEdgeBitSet findNotLoneUndirectedEdges ()
 finds and returns all not-lone (valid) undirected edges Generated from method MR.MeshTopology.findNotLoneUndirectedEdges.
unsafe bool hasEdge (MR.EdgeId e)
 returns true if given edge is within valid range and not-lone Generated from method MR.MeshTopology.hasEdge.
unsafe ulong heapBytes ()
 returns the amount of memory this object occupies on heap Generated from method MR.MeshTopology.heapBytes.
unsafe MR.EdgeId next (MR.EdgeId he)
 next (counter clock wise) half-edge in the origin ring Generated from method MR.MeshTopology.next.
unsafe MR.EdgeId prev (MR.EdgeId he)
 previous (clock wise) half-edge in the origin ring Generated from method MR.MeshTopology.prev.
unsafe MR.VertId org (MR.EdgeId he)
 returns origin vertex of half-edge Generated from method MR.MeshTopology.org.
unsafe MR.VertId dest (MR.EdgeId he)
 returns destination vertex of half-edge Generated from method MR.MeshTopology.dest.
unsafe MR.FaceId left (MR.EdgeId he)
 returns left face of half-edge Generated from method MR.MeshTopology.left.
unsafe MR.FaceId right (MR.EdgeId he)
 returns right face of half-edge Generated from method MR.MeshTopology.right.
unsafe bool fromSameOriginRing (MR.EdgeId a, MR.EdgeId b)
 returns true if a and b are both from the same origin ring Generated from method MR.MeshTopology.fromSameOriginRing.
unsafe bool fromSameLeftRing (MR.EdgeId a, MR.EdgeId b)
 returns true if a and b are both from the same left face ring Generated from method MR.MeshTopology.fromSameLeftRing.
unsafe int getOrgDegree (MR.EdgeId a)
 returns the number of edges around the origin vertex, returns 1 for lone edges Generated from method MR.MeshTopology.getOrgDegree.
unsafe int getVertDegree (MR.VertId v)
 returns the number of edges around the given vertex Generated from method MR.MeshTopology.getVertDegree.
unsafe bool isOrgInnerAndHasDegree (MR.EdgeId a, int d)
 returns true if the origin of given edge is inner to the mesh (no boundary passes via it), and has the given number of incident edges (including input one) Generated from method MR.MeshTopology.isOrgInnerAndHasDegree.
unsafe bool isVertInnerAndHasDegree (MR.VertId v, int d)
 returns true if the given vertex is inner to the mesh (no boundary passes via it), and has the given number of incident edges Generated from method MR.MeshTopology.isVertInnerAndHasDegree.
unsafe int getLeftDegree (MR.EdgeId a)
 returns the number of edges around the left face: 3 for triangular faces, ... Generated from method MR.MeshTopology.getLeftDegree.
unsafe int getFaceDegree (MR.FaceId f)
 returns the number of edges around the given face: 3 for triangular faces, ... Generated from method MR.MeshTopology.getFaceDegree.
unsafe bool isLeftTri (MR.EdgeId a)
 returns true if the cell to the left of a is triangular Generated from method MR.MeshTopology.isLeftTri.
unsafe void getTriVerts (MR.FaceId f, ref MR.VertId v0, ref MR.VertId v1, ref MR.VertId v2)
 gets 3 vertices of given triangular face; the vertices are returned in counter-clockwise order if look from mesh outside Generated from method MR.MeshTopology.getTriVerts.
unsafe void getTriVerts (MR.FaceId f, ref MR.Std.Array_MRVertId_3 v)
 Generated from method MR.MeshTopology.getTriVerts.
unsafe MR.Std.Array_MRVertId_3 getTriVerts (MR.FaceId f)
 Generated from method MR.MeshTopology.getTriVerts.
unsafe bool isTriVert (MR.FaceId f, MR.VertId v)
 return true if triangular face (f) has (v) as one of its vertices Generated from method MR.MeshTopology.isTriVert.
unsafe MR.Std.Vector_StdArrayMRVertId3 getAllTriVerts ()
 returns three vertex ids for valid triangles, invalid triangles are skipped Generated from method MR.MeshTopology.getAllTriVerts.
unsafe MR.Triangulation getTriangulation ()
 returns three vertex ids for valid triangles (which can be accessed by FaceId), vertex ids for invalid triangles are undefined, and shall not be read Generated from method MR.MeshTopology.getTriangulation.
unsafe void getLeftTriVerts (MR.EdgeId a, ref MR.VertId v0, ref MR.VertId v1, ref MR.VertId v2)
 gets 3 vertices of the left face ( face-id may not exist, but the shape must be triangular) the vertices are returned in counter-clockwise order if look from mesh outside: v0 = org( a ), v1 = dest( a ) Generated from method MR.MeshTopology.getLeftTriVerts.
unsafe void getLeftTriVerts (MR.EdgeId a, ref MR.Std.Array_MRVertId_3 v)
 Generated from method MR.MeshTopology.getLeftTriVerts.
unsafe MR.Std.Array_MRVertId_3 getLeftTriVerts (MR.EdgeId a)
 Generated from method MR.MeshTopology.getLeftTriVerts.
unsafe void getLeftTriEdges (MR.EdgeId e0, ref MR.EdgeId e1, ref MR.EdgeId e2)
 given one edge with triangular face on the left; returns two other edges of the same face, oriented to have this face on the left; the edges are returned in counter-clockwise order if look from mesh outside Generated from method MR.MeshTopology.getLeftTriEdges.
unsafe void getTriEdges (MR.FaceId f, ref MR.EdgeId e0, ref MR.EdgeId e1, ref MR.EdgeId e2)
 gets 3 edges of given triangular face, oriented to have it on the left; the edges are returned in counter-clockwise order if look from mesh outside Generated from method MR.MeshTopology.getTriEdges.
unsafe bool isLeftQuad (MR.EdgeId a)
 returns true if the cell to the left of a is quadrangular Generated from method MR.MeshTopology.isLeftQuad.
unsafe MR.Const_Vector_MREdgeId_MRVertId edgePerVertex ()
 for all valid vertices this vector contains an edge with the origin there Generated from method MR.MeshTopology.edgePerVertex.
unsafe MR.EdgeId edgeWithOrg (MR.VertId a)
 returns valid edge if given vertex is present in the mesh Generated from method MR.MeshTopology.edgeWithOrg.
unsafe bool hasVert (MR.VertId a)
 returns true if given vertex is present in the mesh Generated from method MR.MeshTopology.hasVert.
unsafe int numValidVerts ()
 returns the number of valid vertices Generated from method MR.MeshTopology.numValidVerts.
unsafe MR.VertId lastValidVert ()
 returns last valid vertex id, or invalid id if no single valid vertex exists Generated from method MR.MeshTopology.lastValidVert.
unsafe ulong vertSize ()
 returns the number of vertex records including invalid ones Generated from method MR.MeshTopology.vertSize.
unsafe ulong vertCapacity ()
 returns the number of allocated vert records Generated from method MR.MeshTopology.vertCapacity.
unsafe MR.Const_VertBitSet getValidVerts ()
 returns cached set of all valid vertices Generated from method MR.MeshTopology.getValidVerts.
unsafe void flip (MR.VertBitSet vs)
 sets in (vs) all valid vertices that were not selected before the call, and resets other bits Generated from method MR.MeshTopology.flip.
unsafe MR.Const_VertBitSet getVertIds (MR.Const_VertBitSet? region)
 if region pointer is not null then converts it in reference, otherwise returns all valid vertices in the mesh Generated from method MR.MeshTopology.getVertIds.
unsafe MR.Const_Vector_MREdgeId_MRFaceId edgePerFace ()
 for all valid faces this vector contains an edge with that face at left Generated from method MR.MeshTopology.edgePerFace.
unsafe MR.EdgeId edgeWithLeft (MR.FaceId a)
 returns valid edge if given vertex is present in the mesh Generated from method MR.MeshTopology.edgeWithLeft.
unsafe bool hasFace (MR.FaceId a)
 returns true if given face is present in the mesh Generated from method MR.MeshTopology.hasFace.
unsafe MR.EdgeId sharedEdge (MR.FaceId l, MR.FaceId r)
 if two valid faces share the same edge then it is found and returned Generated from method MR.MeshTopology.sharedEdge.
unsafe MR.EdgeId sharedVertInOrg (MR.EdgeId a, MR.EdgeId b)
 if two valid edges share the same vertex then it is found and returned as Edge with this vertex in origin Generated from method MR.MeshTopology.sharedVertInOrg.
unsafe MR.EdgeId sharedVertInOrg (MR.FaceId l, MR.FaceId r)
 if two valid faces share the same vertex then it is found and returned as Edge with this vertex in origin Generated from method MR.MeshTopology.sharedVertInOrg.
unsafe MR.FaceId sharedFace (MR.EdgeId a, MR.EdgeId b)
 if two valid edges belong to same valid face then it is found and returned Generated from method MR.MeshTopology.sharedFace.
unsafe int numValidFaces ()
 returns the number of valid faces Generated from method MR.MeshTopology.numValidFaces.
unsafe MR.FaceId lastValidFace ()
 returns last valid face id, or invalid id if no single valid face exists Generated from method MR.MeshTopology.lastValidFace.
unsafe ulong faceSize ()
 returns the number of face records including invalid ones Generated from method MR.MeshTopology.faceSize.
unsafe ulong faceCapacity ()
 returns the number of allocated face records Generated from method MR.MeshTopology.faceCapacity.
unsafe MR.Const_FaceBitSet getValidFaces ()
 returns cached set of all valid faces Generated from method MR.MeshTopology.getValidFaces.
unsafe void flip (MR.FaceBitSet fs)
 sets in (fs) all valid faces that were not selected before the call, and resets other bits Generated from method MR.MeshTopology.flip.
unsafe MR.Const_FaceBitSet getFaceIds (MR.Const_FaceBitSet? region)
 if region pointer is not null then converts it in reference, otherwise returns all valid faces in the mesh Generated from method MR.MeshTopology.getFaceIds.
unsafe MR.EdgeId bdEdgeSameLeft (MR.EdgeId e, MR.Const_FaceBitSet? region=null)
 returns the first boundary edge (for given region or for whole mesh if region is nullptr) in counter-clockwise order starting from given edge with the same left face or hole; returns invalid edge if no boundary edge is found Generated from method MR.MeshTopology.bdEdgeSameLeft.
unsafe bool isLeftBdFace (MR.EdgeId e, MR.Const_FaceBitSet? region=null)
 returns true if left(e) is a valid (region) face, and it has a boundary edge (isBdEdge(e,region) == true) Generated from method MR.MeshTopology.isLeftBdFace.
unsafe MR.EdgeId bdEdgeWithLeft (MR.FaceId f, MR.Const_FaceBitSet? region=null)
 returns a boundary edge with given left face considering boundary of given region (or for whole mesh if region is nullptr); returns invalid edge if no boundary edge is found Generated from method MR.MeshTopology.bdEdgeWithLeft.
unsafe bool isBdFace (MR.FaceId f, MR.Const_FaceBitSet? region=null)
 returns true if given face belongs to the region and it has a boundary edge (isBdEdge(e,region) == true) Generated from method MR.MeshTopology.isBdFace.
unsafe MR.FaceBitSet findBdFaces (MR.Const_FaceBitSet? region=null)
 returns all faces for which isBdFace(f, region) is true Generated from method MR.MeshTopology.findBdFaces.
unsafe bool isLeftInRegion (MR.EdgeId e, MR.Const_FaceBitSet? region=null)
 return true if left face of given edge belongs to region (or just have valid id if region is nullptr) Generated from method MR.MeshTopology.isLeftInRegion.
unsafe bool isInnerEdge (MR.EdgeId e, MR.Const_FaceBitSet? region=null)
 return true if given edge is inner for given region (or for whole mesh if region is nullptr) Generated from method MR.MeshTopology.isInnerEdge.
unsafe bool isBdEdge (MR.EdgeId e, MR.Const_FaceBitSet? region=null)
 isBdEdge(e) returns true, if the edge (e) is a boundary edge of the mesh: (e) has a hole from one or both sides. isBdEdge(e, region) returns true, if the edge (e) is a boundary edge of the given region: (e) has a region's face from one side (region.test(f0)==true) and a hole or not-region face from the other side (!f1 || region.test(f1)==false). If the region contains all faces of the mesh then isBdEdge(e) is the union of isBdEdge(e, region) and not-lone edges without both left and right faces. Generated from method MR.MeshTopology.isBdEdge.
unsafe MR.EdgeBitSet findLeftBdEdges (MR.Const_FaceBitSet? region=null, MR.Const_EdgeBitSet? test=null)
 returns all (test) edges for which left(e) does not belong to the region and isBdEdge(e, region) is true Generated from method MR.MeshTopology.findLeftBdEdges.
unsafe MR.EdgeId bdEdgeSameOrigin (MR.EdgeId e, MR.Const_FaceBitSet? region=null)
 returns the first boundary edge (for given region or for whole mesh if region is nullptr) in counter-clockwise order starting from given edge with the same origin; returns invalid edge if no boundary edge is found Generated from method MR.MeshTopology.bdEdgeSameOrigin.
unsafe bool isBdVertexInOrg (MR.EdgeId e, MR.Const_FaceBitSet? region=null)
 returns true if edge's origin is on (region) boundary Generated from method MR.MeshTopology.isBdVertexInOrg.
unsafe MR.EdgeId bdEdgeWithOrigin (MR.VertId v, MR.Const_FaceBitSet? region=null)
 returns a boundary edge with given vertex in origin considering boundary of given region (or for whole mesh if region is nullptr); returns invalid edge if no boundary edge is found Generated from method MR.MeshTopology.bdEdgeWithOrigin.
unsafe bool isBdVertex (MR.VertId v, MR.Const_FaceBitSet? region=null)
 returns true if given vertex is on (region) boundary Generated from method MR.MeshTopology.isBdVertex.
unsafe MR.VertBitSet findBdVerts (MR.Const_FaceBitSet? region=null, MR.Const_VertBitSet? test=null)
 returns all (test) vertices for which isBdVertex(v, region) is true Generated from method MR.MeshTopology.findBdVerts.
unsafe bool isInnerOrBdVertex (MR.VertId v, MR.Const_FaceBitSet? region=null)
 returns true if one of incident faces of given vertex pertain to given region (or any such face exists if region is nullptr) Generated from method MR.MeshTopology.isInnerOrBdVertex.
unsafe bool isLeftBdEdge (MR.EdgeId e, MR.Const_FaceBitSet? region=null)
 returns true if left face of given edge belongs to given region (if provided) and right face either does not exist or does not belong Generated from method MR.MeshTopology.isLeftBdEdge.
unsafe bool isInnerOrBdEdge (MR.EdgeId e, MR.Const_FaceBitSet? region=null)
 return true if given edge is inner or boundary for given region (or for whole mesh if region is nullptr), returns false for lone edges Generated from method MR.MeshTopology.isInnerOrBdEdge.
unsafe MR.EdgeId nextLeftBd (MR.EdgeId e, MR.Const_FaceBitSet? region=null, MR.Turn? turn=null)
 given a (region) boundary edge with no right face in given region, returns next boundary edge for the same region: dest(e)==org(res);
unsafe MR.EdgeId prevLeftBd (MR.EdgeId e, MR.Const_FaceBitSet? region=null, MR.Turn? turn=null)
 given a (region) boundary edge with no right face in given region, returns previous boundary edge for the same region; dest(res)==org(e);
unsafe MR.EdgeId findEdge (MR.VertId o, MR.VertId d)
 finds and returns edge from o to d in the mesh; returns invalid edge otherwise Generated from method MR.MeshTopology.findEdge.
unsafe bool isClosed (MR.Const_FaceBitSet? region=null)
 returns true if the mesh (region) does not have any neighboring holes Generated from method MR.MeshTopology.isClosed.
unsafe MR.Std.Vector_MREdgeId findHoleRepresentiveEdges (MR.Const_FaceBitSet? region=null)
 returns one edge with no valid left face for every boundary in the mesh; if region is given, then returned edges must have valid right faces from the region Generated from method MR.MeshTopology.findHoleRepresentiveEdges.
unsafe int findNumHoles (MR.EdgeBitSet? holeRepresentativeEdges=null)
 returns the number of hole loops in the mesh;
unsafe MR.Std.Vector_MREdgeId getLeftRing (MR.EdgeId e)
 returns full edge-loop of left face from (e) starting from (e) itself Generated from method MR.MeshTopology.getLeftRing.
unsafe MR.Std.Vector_StdVectorMREdgeId getLeftRings (MR.Std.Const_Vector_MREdgeId es)
 returns full edge-loops of left faces from every edge in (es); each edge-loop will be returned only once even if some faces are represented by more than one edge in (es) Generated from method MR.MeshTopology.getLeftRings.
unsafe MR.VertBitSet getPathVertices (MR.Std.Const_Vector_MREdgeId path)
 returns all vertices incident to path edges Generated from method MR.MeshTopology.getPathVertices.
unsafe MR.FaceBitSet getPathLeftFaces (MR.Std.Const_Vector_MREdgeId path)
 returns all valid left faces of path edges Generated from method MR.MeshTopology.getPathLeftFaces.
unsafe MR.FaceBitSet getPathRightFaces (MR.Std.Const_Vector_MREdgeId path)
 returns all valid right faces of path edges Generated from method MR.MeshTopology.getPathRightFaces.
unsafe void write (MR.Std.Ostream s)
 saves in binary stream Generated from method MR.MeshTopology.write.
unsafe bool updatingValids ()
 returns whether the methods validVerts(), validFaces(), numValidVerts(), numValidFaces() can be called Generated from method MR.MeshTopology.updatingValids.
unsafe bool checkValidity (MR.Std._ByValue_Function_Bool_From_Float? cb=null, bool? allVerts=null)
 verifies that all internal data structures are valid; if allVerts=true then checks in addition that all not-lone edges have valid vertices on both ends Generated from method MR.MeshTopology.checkValidity. Parameter cb defaults to {}. Parameter allVerts defaults to true.
bool Equals (MR.Const_MeshTopology? b)
override bool Equals (object? other)

Additional Inherited Members

Static Public Member Functions inherited from MR.Const_MeshTopology
static unsafe bool operator== (MR.Const_MeshTopology _this, MR.Const_MeshTopology b)
 compare that two topologies are exactly the same Generated from method MR::MeshTopology::operator==.
static unsafe bool operator!= (MR.Const_MeshTopology _this, MR.Const_MeshTopology b)
Protected Member Functions inherited from MR.Const_MeshTopology
virtual unsafe void Dispose (bool disposing)

Detailed Description

Mesh Topology Generated from class MR.MeshTopology. This is the non-const half of the class.

Constructor & Destructor Documentation

◆ MeshTopology() [1/4]

unsafe MR.MeshTopology.MeshTopology ( )
inline

Constructs an empty (default-constructed) instance.

◆ MeshTopology() [2/4]

unsafe MR.MeshTopology.MeshTopology ( MR._ByValue_MeshTopology _other)
inline

Generated from constructor MR.MeshTopology.MeshTopology.

◆ MeshTopology() [3/4]

MR.MeshTopology.MeshTopology ( Const_MeshTopology _other)
inline

Generated from constructor MR.MeshTopology.MeshTopology.

◆ MeshTopology() [4/4]

MR.MeshTopology.MeshTopology ( MeshTopology _other)
inline

Generated from constructor MR.MeshTopology.MeshTopology.

Member Function Documentation

◆ addFaceId()

unsafe MR.FaceId MR.MeshTopology.addFaceId ( )
inline

creates new face-id not associated with any edge yet Generated from method MR.MeshTopology.addFaceId.

◆ addPackedPart()

unsafe void MR.MeshTopology.addPackedPart ( MR.Const_MeshTopology from,
MR.EdgeId toEdgeId,
MR.Const_FaceMap fmap,
MR.Const_VertMap vmap )
inline

copies topology (from) into this;

Parameters
fromedges must be tightly packes without any lone edges, and they are mapped [0, from.edges.size()) -> [toEdgeId, toEdgeId + from.edges.size());
fmap,vmapmapping of vertices and faces if it is given ( from.id -> this.id ) Generated from method MR.MeshTopology.addPackedPart.

◆ addPart() [1/2]

unsafe void MR.MeshTopology.addPart ( MR.Const_MeshTopology from,
MR.Const_PartMapping? map = null,
bool? rearrangeTriangles = null )
inline

appends mesh topology (from) in addition to the current topology: creates new edges, faces, verts;

Parameters
rearrangeTrianglesif true then the order of triangles is selected according to the order of their vertices, please call rotateTriangles() first Generated from method MR.MeshTopology.addPart. Parameter map defaults to {}. Parameter rearrangeTriangles defaults to false.

◆ addPart() [2/2]

unsafe void MR.MeshTopology.addPart ( MR.Const_MeshTopology from,
MR.FaceMap? outFmap = null,
MR.VertMap? outVmap = null,
MR.WholeEdgeMap? outEmap = null,
bool? rearrangeTriangles = null )
inline

Generated from method MR.MeshTopology.addPart. Parameter rearrangeTriangles defaults to false.

◆ addPartByMask() [1/2]

unsafe void MR.MeshTopology.addPartByMask ( MR.Const_MeshTopology from,
MR.Const_FaceBitSet? fromFaces,
bool? flipOrientation = null,
MR.Std.Const_Vector_StdVectorMREdgeId? thisContours = null,
MR.Std.Const_Vector_StdVectorMREdgeId? fromContours = null,
MR.Const_PartMapping? map = null )
inline

this version has more parameters

Parameters
flipOrientationif true then every from triangle is inverted before adding
thisContourscontours on this mesh (no left face) that have to be stitched with
fromContourscontours on from mesh during addition (no left face if flipOrientation otherwise no right face) Generated from method MR.MeshTopology.addPartByMask. Parameter flipOrientation defaults to false. Parameter thisContours defaults to {}. Parameter fromContours defaults to {}. Parameter map defaults to {}.

◆ addPartByMask() [2/2]

unsafe void MR.MeshTopology.addPartByMask ( MR.Const_MeshTopology from,
MR.Const_FaceBitSet? fromFaces,
MR.Const_PartMapping? map = null )
inline

the same but copies only portion of (from) specified by fromFaces, Generated from method MR.MeshTopology.addPartByMask. Parameter map defaults to {}.

◆ addVertId()

unsafe MR.VertId MR.MeshTopology.addVertId ( )
inline

creates new vert-id not associated with any edge yet Generated from method MR.MeshTopology.addVertId.

◆ assign()

unsafe MR.MeshTopology MR.MeshTopology.assign ( MR._ByValue_MeshTopology _other)
inline

Generated from method MR::MeshTopology::operator=.

◆ buildGridMesh()

unsafe bool MR.MeshTopology.buildGridMesh ( MR.Const_GridSettings settings,
MR.Std._ByValue_Function_Bool_From_Float? cb = null )
inline

Generated from method MR.MeshTopology.buildGridMesh. Parameter cb defaults to {}.

◆ collapseEdge()

unsafe MR.EdgeId MR.MeshTopology.collapseEdge ( MR.EdgeId e,
MR.Std.Const_Function_Void_From_MREdgeId_MREdgeId onEdgeDel )
inline

collapses given edge in a vertex and deletes 1) faces: left( e ) and right( e ); 2) edges: e, next( e.sym() ), prev( e.sym() ), and optionally next( e ), prev( e ) if their left and right triangles are deleted; 3) all vertices that lost their last edge; calls onEdgeDel for every deleted edge (del) including given (e); if valid (rem) is given then dest( del ) = dest( rem ) and their origins are in different ends of collapsing edge, (rem) shall take the place of (del)

Returns
prev( e ) if it is still valid Generated from method MR.MeshTopology.collapseEdge.

◆ computeValidsFromEdges()

unsafe bool MR.MeshTopology.computeValidsFromEdges ( MR.Std._ByValue_Function_Bool_From_Float? cb = null)
inline

compute 1) numValidVerts_ and validVerts_ from edgePerVertex_ 2) numValidFaces_ and validFaces_ from edgePerFace_ and activates their auto-update Generated from method MR.MeshTopology.computeValidsFromEdges. Parameter cb defaults to {}.

◆ deleteFace()

unsafe void MR.MeshTopology.deleteFace ( MR.FaceId f,
MR.Const_UndirectedEdgeBitSet? keepEdges = null )
inline

deletes the face, also deletes its edges and vertices if they were not shared by other faces and not in

Parameters
keepFacesGenerated from method MR.MeshTopology.deleteFace.

◆ deleteFaces()

unsafe void MR.MeshTopology.deleteFaces ( MR.Const_FaceBitSet fs,
MR.Const_UndirectedEdgeBitSet? keepEdges = null )
inline

deletes multiple given faces by calling deleteFace for each Generated from method MR.MeshTopology.deleteFaces.

◆ edgeReserve()

unsafe void MR.MeshTopology.edgeReserve ( ulong newCapacity)
inline

sets the capacity of half-edges vector Generated from method MR.MeshTopology.edgeReserve.

◆ faceReserve()

unsafe void MR.MeshTopology.faceReserve ( ulong newCapacity)
inline

sets the capacity of faces vector Generated from method MR.MeshTopology.faceReserve.

◆ faceResize()

unsafe void MR.MeshTopology.faceResize ( ulong newSize)
inline

explicitly increases the size of faces vector Generated from method MR.MeshTopology.faceResize.

◆ faceResizeWithReserve()

unsafe void MR.MeshTopology.faceResizeWithReserve ( ulong newSize)
inline

explicitly increases the size of faces vector, doubling the current capacity if it was not enough Generated from method MR.MeshTopology.faceResizeWithReserve.

◆ flipEdge()

unsafe void MR.MeshTopology.flipEdge ( MR.EdgeId e)
inline

given the edge with left and right triangular faces, which form together a quadrangle, rotates the edge counter-clockwise inside the quadrangle Generated from method MR.MeshTopology.flipEdge.

◆ flipOrientation()

unsafe void MR.MeshTopology.flipOrientation ( MR.Const_UndirectedEdgeBitSet? fullComponents = null)
inline

flip orientation (normals) of

  • all mesh elements if
    Parameters
    fullComponentsis nullptr, or
  • given mesh components in
    Parameters
    fullComponents.The behavior is undefined if fullComponents is given but there are connected components with some edges included and not-included there. Generated from method MR.MeshTopology.flipOrientation.

◆ makeEdge()

unsafe MR.EdgeId MR.MeshTopology.makeEdge ( )
inline

creates an edge not associated with any vertex or face Generated from method MR.MeshTopology.makeEdge.

◆ pack() [1/2]

unsafe void MR.MeshTopology.pack ( MR.Const_PackMapping map)
inline

tightly packs all arrays eliminating lone edges and invalid faces and vertices; reorder all faces, vertices and edges according to given maps, each containing old id -> new id mapping Generated from method MR.MeshTopology.pack.

◆ pack() [2/2]

unsafe void MR.MeshTopology.pack ( MR.FaceMap? outFmap = null,
MR.VertMap? outVmap = null,
MR.WholeEdgeMap? outEmap = null,
bool? rearrangeTriangles = null )
inline

tightly packs all arrays eliminating lone edges and invalid faces and vertices

Parameters
outFmap,outVmap,outEmapif given returns mappings: old.id -> new.id;
rearrangeTrianglesif true then calls rotateTriangles() and selects the order of triangles according to the order of their vertices Generated from method MR.MeshTopology.pack. Parameter rearrangeTriangles defaults to false.

◆ packMinMem()

unsafe void MR.MeshTopology.packMinMem ( MR.Const_PackMapping map)
inline

tightly packs all arrays eliminating lone edges and invalid faces and vertices; reorder all faces, vertices and edges according to given maps, each containing old id -> new id mapping; unlike pack method, this method allocates minimal amount of memory for its operation but works much slower Generated from method MR.MeshTopology.packMinMem.

◆ preferEdges()

unsafe void MR.MeshTopology.preferEdges ( MR.Const_UndirectedEdgeBitSet stableEdges)
inline

for incident vertices and faces of given edges, remember one of them as edgeWithOrg and edgeWithLeft; this is important in parallel algorithms where other edges may change but stable ones will survive Generated from method MR.MeshTopology.preferEdges.

◆ read()

unsafe void MR.MeshTopology.read ( MR.Std.Istream s,
MR.Std._ByValue_Function_Bool_From_Float? callback = null )
inline

loads from binary stream

Returns
text of error if any Generated from method MR.MeshTopology.read. Parameter callback defaults to {}.

◆ resizeBeforeParallelAdd()

unsafe void MR.MeshTopology.resizeBeforeParallelAdd ( ulong edgeSize,
ulong vertSize,
ulong faceSize )
inline

These function are for parallel mesh creation from different threads. If you are not sure, do not use them.

resizes all internal vectors and sets the numbers of valid elements in preparation for addPackedPart; edges are resized without initialization (so the user must initialize them using addPackedPart) Generated from method MR.MeshTopology.resizeBeforeParallelAdd.

◆ rotateTriangles()

unsafe void MR.MeshTopology.rotateTriangles ( )
inline

for each triangle selects edgeWithLeft with minimal origin vertex Generated from method MR.MeshTopology.rotateTriangles.

◆ setLeft()

unsafe void MR.MeshTopology.setLeft ( MR.EdgeId a,
MR.FaceId f )
inline

sets new left face to the full left ring including this edge; edgePerFace_ table is updated accordingly Generated from method MR.MeshTopology.setLeft.

◆ setOrg()

unsafe void MR.MeshTopology.setOrg ( MR.EdgeId a,
MR.VertId v )
inline

sets new origin to the full origin ring including this edge; edgePerVertex_ table is updated accordingly Generated from method MR.MeshTopology.setOrg.

◆ shrinkToFit()

unsafe void MR.MeshTopology.shrinkToFit ( )
inline

requests the removal of unused capacity Generated from method MR.MeshTopology.shrinkToFit.

◆ splice()

unsafe void MR.MeshTopology.splice ( MR.EdgeId a,
MR.EdgeId b )
inline

given two half edges do either of two: 1) if a and b were from distinct rings, puts them in one ring; 2) if a and b were from the same ring, puts them in separate rings; the cut in rings in both cases is made after a and b Generated from method MR.MeshTopology.splice.

◆ splitEdge()

unsafe MR.EdgeId MR.MeshTopology.splitEdge ( MR.EdgeId e,
MR.FaceBitSet? region = null,
MR.Phmap.FlatHashMap_MRFaceId_MRFaceId? new2Old = null )
inline

split given edge on two parts: dest(returned-edge) = org(e) - newly created vertex, org(returned-edge) = org(e-before-split), dest(e) = dest(e-before-split)

left and right faces of given edge if valid are also subdivided on two parts each; the split edge will keep both face IDs and their degrees, and the new edge will have new face IDs and new faces are triangular; if left or right faces of the original edge were in the region, then include new parts of these faces in the region

Parameters
new2Oldreceive mapping from newly appeared triangle to its original triangle (part to full) Generated from method MR.MeshTopology.splitEdge.

◆ splitFace()

unsafe MR.VertId MR.MeshTopology.splitFace ( MR.FaceId f,
MR.FaceBitSet? region = null,
MR.Phmap.FlatHashMap_MRFaceId_MRFaceId? new2Old = null )
inline

split given triangle on three triangles, introducing new vertex (which is returned) inside original triangle and connecting it to its vertices

if region is given, then it must include (f) and new faces will be added there as well

Parameters
new2Oldreceive mapping from newly appeared triangle to its original triangle (part to full) Generated from method MR.MeshTopology.splitFace.

◆ stopUpdatingValids()

unsafe void MR.MeshTopology.stopUpdatingValids ( )
inline

stops updating validVerts(), validFaces(), numValidVerts(), numValidFaces() for parallel processing of mesh parts Generated from method MR.MeshTopology.stopUpdatingValids.

◆ vertReserve()

unsafe void MR.MeshTopology.vertReserve ( ulong newCapacity)
inline

sets the capacity of vertices vector Generated from method MR.MeshTopology.vertReserve.

◆ vertResize()

unsafe void MR.MeshTopology.vertResize ( ulong newSize)
inline

explicitly increases the size of vertices vector Generated from method MR.MeshTopology.vertResize.

◆ vertResizeWithReserve()

unsafe void MR.MeshTopology.vertResizeWithReserve ( ulong newSize)
inline

explicitly increases the size of vertices vector, doubling the current capacity if it was not enough Generated from method MR.MeshTopology.vertResizeWithReserve.


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