Documentation
¶
Overview ¶
Package dcel implements a doubly connected edge list data structure, and is used to represent planar graphs in a plane. This implementation is intended to be used in 2D space only.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DCEL ¶
DCEL stores the state of the data structure and provides methods for linking of three sets of objects: vertecies, edges and faces.
func (*DCEL) NewEdge ¶
NewEdge creates a pair of half-edges, one of them starting at the given vertex.
func (*DCEL) NewHalfEdge ¶
NewHalfEdge creates a new half-edge starting at the given vertex and stores it in the structure.
type Face ¶
Face represents a subdivision of the plane. Each face has a pointer to one of the half edges at its boundary. Faces can have user specified IDs and annotations.
type HalfEdge ¶
type HalfEdge struct { Target *Vertex Face *Face Twin *HalfEdge Next *HalfEdge Prev *HalfEdge Data interface{} }
HalfEdge represents one of the half-edges in an edge pair. Each half-edge has a pointer to its target vertex (origin), the face to which it belongs, its twin edge (a reversed half-edge, pointing to a neighbour face) and pointers to the next and previous half-edges at the boundary of its face. Half-edges can also store user data.