intersect

package
v0.0.0-...-3cd2f5a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LEFT eventType = iota
	RIGHT
)

Variables

View Source
var ErrStopIteration = errors.New("Stop Iteration")

ErrStopIteration is used to stop the iteration.

Functions

This section is empty.

Types

type EventQueue

type EventQueue struct {
	CMP cmp.Compare
	// contains filtered or unexported fields
}

func (*EventQueue) FindIntersects

func (eq *EventQueue) FindIntersects(ctx context.Context, connected bool, fn func(src, dest int, pt [2]float64) error) error

func (EventQueue) Len

func (eq EventQueue) Len() int

func (EventQueue) Less

func (eq EventQueue) Less(i, j int) bool

func (EventQueue) Swap

func (eq EventQueue) Swap(i, j int)

type Ring

type Ring struct {
	IncludeBorder bool

	CMP pkgcmp.Compare
	// contains filtered or unexported fields
}

func NewRing

func NewRing(segs []geom.Line) *Ring

func NewRingFromPointers

func NewRingFromPointers(pts ...geom.Pointer) *Ring

func NewRingFromPoints

func NewRingFromPoints(pts ...[2]float64) *Ring

func (*Ring) ContainsPoint

func (r *Ring) ContainsPoint(pt [2]float64) bool

func (*Ring) Extent

func (r *Ring) Extent() *geom.Extent

type SearchSegmentIdxs

type SearchSegmentIdxs struct {
	// contains filtered or unexported fields
}

func NewSearchSegmentIdxs

func NewSearchSegmentIdxs(segs []geom.Line) *SearchSegmentIdxs

func (*SearchSegmentIdxs) SearchIntersectIdxs

func (segs *SearchSegmentIdxs) SearchIntersectIdxs(seg geom.Line, filters ...SegmentFilterFn) (idxs []int)

type SegmentFilterFn

type SegmentFilterFn func(result []int, seg geom.Line, idx int) (refuse, abort bool)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL