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

topology of one or several polylines (how line segments are connected in lines) common for 2D and 3D polylines Generated from class MR.PolylineTopology. This is the non-const half of the class. More...

+ Inheritance diagram for MR.PolylineTopology:

Public Member Functions

unsafe PolylineTopology ()
 Constructs an empty (default-constructed) instance.
 
unsafe PolylineTopology (MR._ByValue_PolylineTopology _other)
 Generated from constructor MR.PolylineTopology.PolylineTopology.
 
 PolylineTopology (Const_PolylineTopology _other)
 Generated from constructor MR.PolylineTopology.PolylineTopology.
 
 PolylineTopology (PolylineTopology _other)
 Generated from constructor MR.PolylineTopology.PolylineTopology.
 
unsafe MR.PolylineTopology assign (MR._ByValue_PolylineTopology _other)
 Generated from method MR.PolylineTopology.operator=.
 
unsafe void buildOpenLines (MR.Std.Const_Vector_MRVertId comp2firstVert)
 build topology of comp2firstVert.size()-1 not-closed polylines each pair (a,b) of indices in
 
unsafe MR.EdgeId makeEdge ()
 creates an edge not associated with any vertex Generated from method MR.PolylineTopology.makeEdge.
 
unsafe MR.EdgeId makeEdge (MR.VertId a, MR.VertId b, MR._InOpt_EdgeId e=default)
 makes an edge connecting vertices a and b
 
unsafe int makeEdges (MR.Const_Edges edges)
 for every given edge[ue] calls makeEdge( edge[ue][0], edge[ue][1], ue ), making new edges so that edges.size() <= undirectedEdgeSize() at the end
 
unsafe void edgeReserve (ulong newCapacity)
 sets the capacity of half-edges vector Generated from method MR.PolylineTopology.edgeReserve.
 
unsafe void deleteEdge (MR.UndirectedEdgeId ue)
 given edge becomes lone after the call, so it is un-spliced from connected edges, and if it was not connected at origin or destination, then that vertex is deleted as well Generated from method MR.PolylineTopology.deleteEdge.
 
unsafe void deleteEdges (MR.Const_UndirectedEdgeBitSet es)
 calls deleteEdge for every set bit Generated from method MR.PolylineTopology.deleteEdges.
 
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;
 
unsafe void setOrg (MR.EdgeId a, MR.VertId v)
 sets new origin to the full origin ring including this edge
 
unsafe MR.VertId addVertId ()
 creates new vert-id not associated with any edge yet Generated from method MR.PolylineTopology.addVertId.
 
unsafe void vertResize (ulong newSize)
 explicitly increases the size of vertices vector Generated from method MR.PolylineTopology.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.PolylineTopology.vertResizeWithReserve.
 
unsafe void vertReserve (ulong newCapacity)
 sets the capacity of vertices vector Generated from method MR.PolylineTopology.vertReserve.
 
unsafe MR.EdgeId splitEdge (MR.EdgeId e)
 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) Generated from method MR.PolylineTopology.splitEdge.
 
unsafe MR.EdgeId makePolyline (MR.VertId? vs, ulong num)
 adds polyline in this topology passing progressively via vertices *[vs, vs+num); if vs[0] == vs[num-1] then a closed polyline is created; return the edge from first to second vertex Generated from method MR.PolylineTopology.makePolyline.
 
unsafe void addPart (MR.Const_PolylineTopology from, MR.VertMap? outVmap=null, MR.WholeEdgeMap? outEmap=null)
 appends polyline topology (from) in addition to the current topology: creates new edges, verts;
 
unsafe void addPartByMask (MR.Const_PolylineTopology from, MR.Const_UndirectedEdgeBitSet mask, MR.VertMap? outVmap=null, MR.EdgeMap? outEmap=null)
 appends polyline topology (from) in addition to the current topology: creates new edges, verts; Generated from method MR.PolylineTopology.addPartByMask.
 
unsafe void pack (MR.VertMap? outVmap=null, MR.WholeEdgeMap? outEmap=null)
 tightly packs all arrays eliminating lone edges and invalid vertices
 
unsafe bool read (MR.Std.Istream s)
 loads this from binary stream Generated from method MR.PolylineTopology.read.
 
unsafe void flip ()
 changes the orientation of all edges: every edge e is replaced with e.sym() Generated from method MR.PolylineTopology.flip.
 
unsafe void computeValidsFromEdges ()
 computes numValidVerts_ and validVerts_ from edgePerVertex_ Generated from method MR.PolylineTopology.computeValidsFromEdges.
 

Detailed Description

topology of one or several polylines (how line segments are connected in lines) common for 2D and 3D polylines Generated from class MR.PolylineTopology. This is the non-const half of the class.

Constructor & Destructor Documentation

◆ PolylineTopology() [1/4]

unsafe MR.PolylineTopology.PolylineTopology ( )
inline

Constructs an empty (default-constructed) instance.

◆ PolylineTopology() [2/4]

unsafe MR.PolylineTopology.PolylineTopology ( MR._ByValue_PolylineTopology _other)
inline

Generated from constructor MR.PolylineTopology.PolylineTopology.

◆ PolylineTopology() [3/4]

MR.PolylineTopology.PolylineTopology ( Const_PolylineTopology _other)
inline

Generated from constructor MR.PolylineTopology.PolylineTopology.

◆ PolylineTopology() [4/4]

MR.PolylineTopology.PolylineTopology ( PolylineTopology _other)
inline

Generated from constructor MR.PolylineTopology.PolylineTopology.

Member Function Documentation

◆ addPart()

unsafe void MR.PolylineTopology.addPart ( MR.Const_PolylineTopology from,
MR.VertMap? outVmap = null,
MR.WholeEdgeMap? outEmap = null )
inline

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

Parameters
outVmap,outEmap(optionally) returns mappings: from.id -> this.id Generated from method MR.PolylineTopology.addPart.

◆ addPartByMask()

unsafe void MR.PolylineTopology.addPartByMask ( MR.Const_PolylineTopology from,
MR.Const_UndirectedEdgeBitSet mask,
MR.VertMap? outVmap = null,
MR.EdgeMap? outEmap = null )
inline

appends polyline topology (from) in addition to the current topology: creates new edges, verts; Generated from method MR.PolylineTopology.addPartByMask.

◆ addVertId()

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

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

◆ assign()

unsafe MR.PolylineTopology MR.PolylineTopology.assign ( MR._ByValue_PolylineTopology _other)
inline

Generated from method MR.PolylineTopology.operator=.

◆ buildOpenLines()

unsafe void MR.PolylineTopology.buildOpenLines ( MR.Std.Const_Vector_MRVertId comp2firstVert)
inline

build topology of comp2firstVert.size()-1 not-closed polylines each pair (a,b) of indices in

Parameters
comp2firstVertdefines vertex range of a polyline [a,b) Generated from method MR.PolylineTopology.buildOpenLines.

◆ computeValidsFromEdges()

unsafe void MR.PolylineTopology.computeValidsFromEdges ( )
inline

computes numValidVerts_ and validVerts_ from edgePerVertex_ Generated from method MR.PolylineTopology.computeValidsFromEdges.

◆ deleteEdge()

unsafe void MR.PolylineTopology.deleteEdge ( MR.UndirectedEdgeId ue)
inline

given edge becomes lone after the call, so it is un-spliced from connected edges, and if it was not connected at origin or destination, then that vertex is deleted as well Generated from method MR.PolylineTopology.deleteEdge.

◆ deleteEdges()

unsafe void MR.PolylineTopology.deleteEdges ( MR.Const_UndirectedEdgeBitSet es)
inline

calls deleteEdge for every set bit Generated from method MR.PolylineTopology.deleteEdges.

◆ edgeReserve()

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

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

◆ flip()

unsafe void MR.PolylineTopology.flip ( )
inline

changes the orientation of all edges: every edge e is replaced with e.sym() Generated from method MR.PolylineTopology.flip.

◆ makeEdge() [1/2]

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

creates an edge not associated with any vertex Generated from method MR.PolylineTopology.makeEdge.

◆ makeEdge() [2/2]

unsafe MR.EdgeId MR.PolylineTopology.makeEdge ( MR.VertId a,
MR.VertId b,
MR._InOpt_EdgeId e = default )
inline

makes an edge connecting vertices a and b

Parameters
eif valid then the function does not make new edge, but connects the vertices using given one (and returns it)

if 1) any of the vertices is invalid or not within the vertSize(), 2) or a==b, 3) or either a or b already has 2 incident edges, 4) given edge e is not lone or not within the edgeSize() then makeEdge(a,b) does nothing and returns invalid edge Generated from method MR.PolylineTopology.makeEdge. Parameter e defaults to {}.

◆ makeEdges()

unsafe int MR.PolylineTopology.makeEdges ( MR.Const_Edges edges)
inline

for every given edge[ue] calls makeEdge( edge[ue][0], edge[ue][1], ue ), making new edges so that edges.size() <= undirectedEdgeSize() at the end

Returns
the total number of edges created Generated from method MR.PolylineTopology.makeEdges.

◆ makePolyline()

unsafe MR.EdgeId MR.PolylineTopology.makePolyline ( MR.VertId? vs,
ulong num )
inline

adds polyline in this topology passing progressively via vertices *[vs, vs+num); if vs[0] == vs[num-1] then a closed polyline is created; return the edge from first to second vertex Generated from method MR.PolylineTopology.makePolyline.

◆ pack()

unsafe void MR.PolylineTopology.pack ( MR.VertMap? outVmap = null,
MR.WholeEdgeMap? outEmap = null )
inline

tightly packs all arrays eliminating lone edges and invalid vertices

Parameters
outVmap,outEmapif given returns mappings: old.id -> new.id; Generated from method MR.PolylineTopology.pack.

◆ read()

unsafe bool MR.PolylineTopology.read ( MR.Std.Istream s)
inline

loads this from binary stream Generated from method MR.PolylineTopology.read.

◆ setOrg()

unsafe void MR.PolylineTopology.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.PolylineTopology.setOrg.

◆ splice()

unsafe void MR.PolylineTopology.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.PolylineTopology.splice.

◆ splitEdge()

unsafe MR.EdgeId MR.PolylineTopology.splitEdge ( MR.EdgeId e)
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) Generated from method MR.PolylineTopology.splitEdge.

◆ vertReserve()

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

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

◆ vertResize()

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

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

◆ vertResizeWithReserve()

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

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


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