Search Results for

    Show / Hide Table of Contents

    Class GraphCells2d

    This class extracts the set of loops bounding the "cells" of a DGraph2, ie each cell is a connected region with a polygonal boundary. Precondition: the graph has no self-intersections. Precondition: at any vertex, the edges are sortable by angle (ie no outgoing edges overlap) ** numerically this may not be 100% reliable....

    Both "sides" of each edge are included in some cell boundary, ie so for a simple polygon, there are two cells, one infinitely large. The "inside" cells will be oriented clockwise, if converted to a Polygon2d.

    Inheritance
    Object
    GraphCells2d
    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 GraphCells2d

    Constructors

    GraphCells2d(DGraph2)

    Declaration
    public GraphCells2d(DGraph2 graph)
    Parameters
    Type Name Description
    DGraph2 graph

    Fields

    CellLoops

    Declaration
    public List<int[]> CellLoops
    Field Value
    Type Description
    List<Int32[]>

    Graph

    Declaration
    public DGraph2 Graph
    Field Value
    Type Description
    DGraph2

    Methods

    CellsToPolygons(Func<Polygon2d, Boolean>)

    Convert cells to polygons, with optional filter. If filter returns false, polygon is not included in output

    Declaration
    public List<Polygon2d> CellsToPolygons(Func<Polygon2d, bool> FilterF = null)
    Parameters
    Type Name Description
    Func<Polygon2d, Boolean> FilterF
    Returns
    Type Description
    List<Polygon2d>

    ContainedCells(GeneralPolygon2d)

    Find cells that are "inside" the container polygon. Currently based on finding a point inside the cell and then checking that it is also inside the container. This is perhaps not ideal!!

    Declaration
    public List<Polygon2d> ContainedCells(GeneralPolygon2d container)
    Parameters
    Type Name Description
    GeneralPolygon2d container
    Returns
    Type Description
    List<Polygon2d>

    FindCells()

    Declaration
    public void FindCells()
    In This Article
    Back to top ViRGIS VR GIS