Search Results for

    Show / Hide Table of Contents

    Class Arrangement2d

    Arrangement2d constructs a planar arrangement of a set of 2D line segments. When a segment is inserted, existing edges are split, and the inserted segment becomes multiple graph edges. So, the resulting DGraph2 should not have any edges that intersect.

    Calculations are performed in double-precision, so there is no guarantee of correctness.

    [TODO] multi-level segment has to accelerate find_intersecting_edges() [TODO] maybe smarter handling

    Inheritance
    Object
    Arrangement2d
    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 class Arrangement2d

    Constructors

    Arrangement2d(AxisAlignedBox2d)

    Declaration
    public Arrangement2d(AxisAlignedBox2d boundsHint)
    Parameters
    Type Name Description
    AxisAlignedBox2d boundsHint

    Fields

    Graph

    Declaration
    public DGraph2 Graph
    Field Value
    Type Description
    DGraph2

    PointHash

    Declaration
    public PointHashGrid2d<int> PointHash
    Field Value
    Type Description
    PointHashGrid2d<Int32>

    VertexSnapTol

    Declaration
    public double VertexSnapTol
    Field Value
    Type Description
    Double

    Methods

    ConnectOpenBoundaries(Double)

    connect open boundary vertices within distThresh, by inserting new segments

    Declaration
    public void ConnectOpenBoundaries(double distThresh)
    Parameters
    Type Name Description
    Double distThresh

    find_existing_vertex(Vector2d)

    find existing vertex at point, if it exists

    Declaration
    protected int find_existing_vertex(Vector2d pt)
    Parameters
    Type Name Description
    Vector2d pt
    Returns
    Type Description
    Int32

    find_intersecting_edges(ref Vector2d, ref Vector2d, List<Arrangement2d.Intersection>, Double)

    find set of edges in graph that intersect with edge [a,b]

    Declaration
    protected bool find_intersecting_edges(ref Vector2d a, ref Vector2d b, List<Arrangement2d.Intersection> hits, double tol = 0)
    Parameters
    Type Name Description
    Vector2d a
    Vector2d b
    List<Arrangement2d.Intersection> hits
    Double tol
    Returns
    Type Description
    Boolean

    find_nearest_boundary_vertex(Vector2d, Double, Int32)

    find nearest boundary vertex, within searchRadius

    Declaration
    protected int find_nearest_boundary_vertex(Vector2d pt, double searchRadius, int ignore_vid = -1)
    Parameters
    Type Name Description
    Vector2d pt
    Double searchRadius
    Int32 ignore_vid
    Returns
    Type Description
    Int32

    find_nearest_vertex(Vector2d, Double, Int32)

    find closest vertex, within searchRadius

    Declaration
    protected int find_nearest_vertex(Vector2d pt, double searchRadius, int ignore_vid = -1)
    Parameters
    Type Name Description
    Vector2d pt
    Double searchRadius
    Int32 ignore_vid
    Returns
    Type Description
    Int32

    Insert(Polygon2d, Int32)

    sequentially insert segments of polygon

    Declaration
    public void Insert(Polygon2d poly, int gid = -1)
    Parameters
    Type Name Description
    Polygon2d poly
    Int32 gid

    Insert(PolyLine2d, Int32)

    sequentially insert segments of polyline

    Declaration
    public void Insert(PolyLine2d pline, int gid = -1)
    Parameters
    Type Name Description
    PolyLine2d pline
    Int32 gid

    Insert(Segment2d, Int32)

    insert segment into the arrangement

    Declaration
    public void Insert(Segment2d segment, int gid = -1)
    Parameters
    Type Name Description
    Segment2d segment
    Int32 gid

    Insert(Vector2d, Vector2d, Int32)

    insert segment [a,b] into the arrangement

    Declaration
    public void Insert(Vector2d a, Vector2d b, int gid = -1)
    Parameters
    Type Name Description
    Vector2d a
    Vector2d b
    Int32 gid

    insert_segment(Vector2d, Vector2d, Int32, Double)

    Declaration
    protected bool insert_segment(Vector2d a, Vector2d b, int gid = -1, double tol = 0)
    Parameters
    Type Name Description
    Vector2d a
    Vector2d b
    Int32 gid
    Double tol
    Returns
    Type Description
    Boolean

    insert_segment(ref Vector2d, ref Vector2d, Int32, Double)

    insert edge [a,b] into the arrangement, splitting existing edges as necessary

    Declaration
    protected bool insert_segment(ref Vector2d a, ref Vector2d b, int gid = -1, double tol = 0)
    Parameters
    Type Name Description
    Vector2d a
    Vector2d b
    Int32 gid
    Double tol
    Returns
    Type Description
    Boolean

    split_segment_at_t(Int32, Double, Double)

    insert new point into segment eid at parameter value t If t is within tol of endpoint of segment, we use that instead.

    Declaration
    protected Index2i split_segment_at_t(int eid, double t, double tol)
    Parameters
    Type Name Description
    Int32 eid
    Double t
    Double tol
    Returns
    Type Description
    Index2i
    In This Article
    Back to top ViRGIS VR GIS