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_VoidFuncFromMREdgeIdMREdgeId 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_BoolFuncFromFloat? 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_BoolFuncFromFloat? 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_BoolFuncFromFloat? cb=null) |
Generated from method MR.MeshTopology.buildGridMesh. Parameter cb defaults to {}. | |
Mesh Topology Generated from class MR.MeshTopology. This is the non-const half of the class.
|
inline |
Constructs an empty (default-constructed) instance.
|
inline |
Generated from constructor MR.MeshTopology.MeshTopology.
|
inline |
Generated from constructor MR.MeshTopology.MeshTopology.
|
inline |
Generated from constructor MR.MeshTopology.MeshTopology.
|
inline |
creates new face-id not associated with any edge yet Generated from method MR.MeshTopology.addFaceId.
|
inline |
copies topology (from) into this;
| from | edges must be tightly packes without any lone edges, and they are mapped [0, from.edges.size()) -> [toEdgeId, toEdgeId + from.edges.size()); |
| fmap,vmap | mapping of vertices and faces if it is given ( from.id -> this.id ) Generated from method MR.MeshTopology.addPackedPart. |
|
inline |
appends mesh topology (from) in addition to the current topology: creates new edges, faces, verts;
| rearrangeTriangles | if 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. |
|
inline |
Generated from method MR.MeshTopology.addPart. Parameter rearrangeTriangles defaults to false.
|
inline |
this version has more parameters
| flipOrientation | if true then every from triangle is inverted before adding |
| thisContours | contours on this mesh (no left face) that have to be stitched with |
| fromContours | contours 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 {}. |
|
inline |
the same but copies only portion of (from) specified by fromFaces, Generated from method MR.MeshTopology.addPartByMask. Parameter map defaults to {}.
|
inline |
creates new vert-id not associated with any edge yet Generated from method MR.MeshTopology.addVertId.
|
inline |
Generated from method MR.MeshTopology.operator=.
|
inline |
Generated from method MR.MeshTopology.buildGridMesh. Parameter cb defaults to {}.
|
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)
MR.MeshTopology.collapseEdge.
|
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 {}.
|
inline |
deletes the face, also deletes its edges and vertices if they were not shared by other faces and not in
| keepFaces | Generated from method MR.MeshTopology.deleteFace. |
|
inline |
deletes multiple given faces by calling deleteFace for each Generated from method MR.MeshTopology.deleteFaces.
|
inline |
sets the capacity of half-edges vector Generated from method MR.MeshTopology.edgeReserve.
|
inline |
sets the capacity of faces vector Generated from method MR.MeshTopology.faceReserve.
|
inline |
explicitly increases the size of faces vector Generated from method MR.MeshTopology.faceResize.
|
inline |
explicitly increases the size of faces vector, doubling the current capacity if it was not enough Generated from method MR.MeshTopology.faceResizeWithReserve.
|
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.
|
inline |
flip orientation (normals) of
| fullComponents | is nullptr, or |
| 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. |
|
inline |
creates an edge not associated with any vertex or face Generated from method MR.MeshTopology.makeEdge.
|
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.
|
inline |
tightly packs all arrays eliminating lone edges and invalid faces and vertices
| outFmap,outVmap,outEmap | if given returns mappings: old.id -> new.id; |
| rearrangeTriangles | if 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. |
|
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.
|
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.
|
inline |
loads from binary stream
MR.MeshTopology.read. Parameter callback defaults to {}.
|
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.
|
inline |
for each triangle selects edgeWithLeft with minimal origin vertex Generated from method MR.MeshTopology.rotateTriangles.
sets new left face to the full left ring including this edge; edgePerFace_ table is updated accordingly Generated from method MR.MeshTopology.setLeft.
sets new origin to the full origin ring including this edge; edgePerVertex_ table is updated accordingly Generated from method MR.MeshTopology.setOrg.
|
inline |
requests the removal of unused capacity Generated from method MR.MeshTopology.shrinkToFit.
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.
|
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
| new2Old | receive mapping from newly appeared triangle to its original triangle (part to full) Generated from method MR.MeshTopology.splitEdge. |
|
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
| new2Old | receive mapping from newly appeared triangle to its original triangle (part to full) Generated from method MR.MeshTopology.splitFace. |
|
inline |
stops updating validVerts(), validFaces(), numValidVerts(), numValidFaces() for parallel processing of mesh parts Generated from method MR.MeshTopology.stopUpdatingValids.
|
inline |
sets the capacity of vertices vector Generated from method MR.MeshTopology.vertReserve.
|
inline |
explicitly increases the size of vertices vector Generated from method MR.MeshTopology.vertResize.
|
inline |
explicitly increases the size of vertices vector, doubling the current capacity if it was not enough Generated from method MR.MeshTopology.vertResizeWithReserve.