rect

package
v0.0.0-...-419585b Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package rect provides algorithms regarding rectangles in a discrete 2D space.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindIntersections

func FindIntersections(rs []image.Rectangle) [][]int

Given a set of rectangles it finds all intersections among those. Found intersections are returned as pairs of indices.

Types

type Rect

type Rect struct {
	image.Rectangle
	// contains filtered or unexported fields
}

An implementation of augumentedtree.Interval.

func NewRect

func NewRect(rect image.Rectangle, id uint64) Rect

Creates a new Rect given a rectangle and an identifier.

func (Rect) HighAtDimension

func (r Rect) HighAtDimension(dim uint64) int64

func (Rect) ID

func (r Rect) ID() uint64

func (Rect) LowAtDimension

func (r Rect) LowAtDimension(dim uint64) int64

func (Rect) OverlapsAtDimension

func (r Rect) OverlapsAtDimension(interval tree.Interval, dim uint64) bool

Jump to

Keyboard shortcuts

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