Versions in this module Expand all Collapse all v0 v0.1.0 Sep 15, 2021 Changes in this version + var AZ = []Point + var DefaultIndexOptions = &IndexOptions + var NoIndexing = &IndexOptions + var RI = []Point + var TX = []Point + type Geometry interface + ContainsLine func(line *Line) bool + ContainsPoint func(point Point) bool + ContainsPoly func(poly *Poly) bool + ContainsRect func(rect Rect) bool + Empty func() bool + IntersectsLine func(line *Line) bool + IntersectsPoint func(point Point) bool + IntersectsPoly func(poly *Poly) bool + IntersectsRect func(rect Rect) bool + Rect func() Rect + type IndexKind byte + const None + const QuadTree + func (kind IndexKind) String() string + type IndexOptions struct + Kind IndexKind + MinPoints int + type Line struct + func NewLine(points []Point, opts *IndexOptions) *Line + func (line *Line) ContainsLine(other *Line) bool + func (line *Line) ContainsPoint(point Point) bool + func (line *Line) ContainsPoly(poly *Poly) bool + func (line *Line) ContainsRect(rect Rect) bool + func (line *Line) IntersectsLine(other *Line) bool + func (line *Line) IntersectsPoint(point Point) bool + func (line *Line) IntersectsPoly(poly *Poly) bool + func (line *Line) IntersectsRect(rect Rect) bool + func (line *Line) Move(deltaX, deltaY float64) *Line + func (series *Line) Clockwise() bool + func (series *Line) Closed() bool + func (series *Line) Convex() bool + func (series *Line) Empty() bool + func (series *Line) Index() []byte + func (series *Line) NumPoints() int + func (series *Line) NumSegments() int + func (series *Line) PointAt(index int) Point + func (series *Line) RawPoints() []Point + func (series *Line) Rect() Rect + func (series *Line) Search(rect Rect, iter func(seg Segment, idx int) bool) + func (series *Line) SegmentAt(index int) Segment + type Point struct + X float64 + Y float64 + func (point Point) ContainsLine(line *Line) bool + func (point Point) ContainsPoint(other Point) bool + func (point Point) ContainsPoly(poly *Poly) bool + func (point Point) ContainsRect(rect Rect) bool + func (point Point) Empty() bool + func (point Point) IntersectsLine(line *Line) bool + func (point Point) IntersectsPoint(other Point) bool + func (point Point) IntersectsPoly(poly *Poly) bool + func (point Point) IntersectsRect(rect Rect) bool + func (point Point) Move(deltaX, deltaY float64) Point + func (point Point) Rect() Rect + type Poly struct + Exterior Ring + Holes []Ring + func NewPoly(exterior []Point, holes [][]Point, opts *IndexOptions) *Poly + func (poly *Poly) Clockwise() bool + func (poly *Poly) ContainsLine(line *Line) bool + func (poly *Poly) ContainsPoint(point Point) bool + func (poly *Poly) ContainsPointEx(point Point) (contains bool, holeIndex int) + func (poly *Poly) ContainsPoly(other *Poly) bool + func (poly *Poly) ContainsRect(rect Rect) bool + func (poly *Poly) Empty() bool + func (poly *Poly) IntersectsLine(line *Line) bool + func (poly *Poly) IntersectsPoint(point Point) bool + func (poly *Poly) IntersectsPoly(other *Poly) bool + func (poly *Poly) IntersectsRect(rect Rect) bool + func (poly *Poly) Move(deltaX, deltaY float64) *Poly + func (poly *Poly) Rect() Rect + type RaycastResult struct + In bool + On bool + type Rect struct + Max Point + Min Point + func (rect Rect) Area() float64 + func (rect Rect) Center() Point + func (rect Rect) Clockwise() bool + func (rect Rect) Closed() bool + func (rect Rect) ContainsLine(line *Line) bool + func (rect Rect) ContainsPoint(point Point) bool + func (rect Rect) ContainsPoly(poly *Poly) bool + func (rect Rect) ContainsRect(other Rect) bool + func (rect Rect) Convex() bool + func (rect Rect) East() Segment + func (rect Rect) Empty() bool + func (rect Rect) Index() []byte + func (rect Rect) IntersectsLine(line *Line) bool + func (rect Rect) IntersectsPoint(point Point) bool + func (rect Rect) IntersectsPoly(poly *Poly) bool + func (rect Rect) IntersectsRect(other Rect) bool + func (rect Rect) Move(deltaX, deltaY float64) Rect + func (rect Rect) NE() Point + func (rect Rect) NW() Point + func (rect Rect) North() Segment + func (rect Rect) NumPoints() int + func (rect Rect) NumSegments() int + func (rect Rect) PointAt(index int) Point + func (rect Rect) RawPoints() []Point + func (rect Rect) Rect() Rect + func (rect Rect) SE() Point + func (rect Rect) SW() Point + func (rect Rect) Search(target Rect, iter func(seg Segment, idx int) bool) + func (rect Rect) SegmentAt(index int) Segment + func (rect Rect) South() Segment + func (rect Rect) Union(other Rect) Rect + func (rect Rect) West() Segment + type Ring = Series + type Segment struct + A Point + B Point + func DistanceToSeries(series Series, distToRect func(rect Rect) float64, ...) (seg Segment, idx int, dist float64) + func (seg Segment) CollinearPoint(point Point) bool + func (seg Segment) ContainsPoint(point Point) bool + func (seg Segment) ContainsSegment(other Segment) bool + func (seg Segment) IntersectsSegment(other Segment) bool + func (seg Segment) Move(deltaX, deltaY float64) Segment + func (seg Segment) Raycast(point Point) RaycastResult + func (seg Segment) Rect() Rect + type Series interface + Clockwise func() bool + Closed func() bool + Convex func() bool + Empty func() bool + Index func() []byte + NumPoints func() int + NumSegments func() int + PointAt func(index int) Point + RawPoints func() []Point + Rect func() Rect + Search func(rect Rect, iter func(seg Segment, index int) bool) + SegmentAt func(index int) Segment