Documentation ¶
Index ¶
- func MultiPolygon(ctx context.Context, triangles []geom.Triangle) geom.MultiPolygon
- func PolygonForRing(ctx context.Context, rng [][2]float64) (plyg [][][2]float64)
- func SortedEdges(t geom.Triangle) [3][2][2]float64
- type Walker
- func (w *Walker) EdgeMap() (edgeMap map[[2][2]float64][]int)
- func (w *Walker) MultiPolygon(ctx context.Context) (mplyg geom.MultiPolygon)
- func (w *Walker) PolygonForTriangle(ctx context.Context, idx int, seen map[int]bool) (plyg [][][2]float64)
- func (w *Walker) RingForTriangle(ctx context.Context, idx int, seen map[int]bool) (rng [][2]float64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MultiPolygon ¶
func PolygonForRing ¶
PolygonForRing returns a polygon for the given ring, this will destroy the ring.
func SortedEdges ¶
Types ¶
type Walker ¶
type Walker struct { Triangles []geom.Triangle Order winding.Order // contains filtered or unexported fields }
func (*Walker) MultiPolygon ¶
func (w *Walker) MultiPolygon(ctx context.Context) (mplyg geom.MultiPolygon)
MultiPolygon walks all triangles and returns the generated polygons as a multipolygon.
func (*Walker) PolygonForTriangle ¶
func (w *Walker) PolygonForTriangle(ctx context.Context, idx int, seen map[int]bool) (plyg [][][2]float64)
PolygonForTriangle walks the triangles starting at the given triangle returning the generated polygon from the walk.
func (*Walker) RingForTriangle ¶
func (w *Walker) RingForTriangle(ctx context.Context, idx int, seen map[int]bool) (rng [][2]float64)
RingForTriangle will walk the set of triangles starting at the given triangle index. As it walks the triangles it will mark them as seen on the seen map. The function will return the outside ring of the walk if seen is nil, the function will panic.
Click to show internal directories.
Click to hide internal directories.