Search Results for

    Show / Hide Table of Contents

    Class DGraph3Util

    Utility functions for DGraph3 data structure

    Inheritance
    Object
    DGraph3Util
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: g3
    Assembly: cs.temp.dll.dll
    Syntax
    public static class DGraph3Util

    Methods

    DisconnectJunction(DGraph3, Int32, Double)

    foreach edge [vid,b] connected to junction vertex vid, remove, add new vertex c, and then add new edge [b,c]. Optionally move c a bit back along edge from vid.

    Declaration
    public static void DisconnectJunction(DGraph3 graph, int vid, double shrinkFactor = 1)
    Parameters
    Type Name Description
    DGraph3 graph
    Int32 vid
    Double shrinkFactor

    ErodeOpenSpurs(DGraph3)

    Erode inwards from open boundary vertices of graph (ie vtx with single edge). Resulting graph is not compact (!)

    Declaration
    public static void ErodeOpenSpurs(DGraph3 graph)
    Parameters
    Type Name Description
    DGraph3 graph

    ExtractCurves(DGraph3, Boolean, Func<Int32, Boolean>)

    Decompose graph into simple polylines and polygons.

    Declaration
    public static DGraph3Util.Curves ExtractCurves(DGraph3 graph, bool bWantLoopIndices = false, Func<int, bool> CurveOrientationF = null)
    Parameters
    Type Name Description
    DGraph3 graph
    Boolean bWantLoopIndices
    Func<Int32, Boolean> CurveOrientationF
    Returns
    Type Description
    DGraph3Util.Curves

    NextEdgeAndVtx(Int32, Int32, DGraph3)

    If we are at edge eid, which as one vertex prev_vid, find 'other' vertex, and other edge connected to that vertex, and return pair [next_edge, shared_vtx] Returns [int.MaxValue, shared_vtx] if shared_vtx is not valence=2 (ie stops at boundaries and complex junctions)

    Declaration
    public static Index2i NextEdgeAndVtx(int eid, int prev_vid, DGraph3 graph)
    Parameters
    Type Name Description
    Int32 eid
    Int32 prev_vid
    DGraph3 graph
    Returns
    Type Description
    Index2i

    WalkToNextNonRegularVtx(DGraph3, Int32, Int32)

    walk through graph from fromVtx, in direction of eid, until we hit the next junction vertex

    Declaration
    public static List<int> WalkToNextNonRegularVtx(DGraph3 graph, int fromVtx, int eid)
    Parameters
    Type Name Description
    DGraph3 graph
    Int32 fromVtx
    Int32 eid
    Returns
    Type Description
    List<Int32>
    In This Article
    Back to top ViRGIS VR GIS