monotone

package
v0.0.0-...-b5aa40e Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	START = iota
	END
	REGULAR
	SPLIT
	MERGE
)

VertexType Const

Variables

This section is empty.

Functions

func Chains

func Chains(dc *dcel.DCEL, f *dcel.Face, pts []*dcel.Vertex) (map[*dcel.Vertex]chain, error)

func CounterClockwiseEdge

func CounterClockwiseEdge(v *dcel.Vertex, dc *dcel.DCEL) *dcel.Edge

func DiagonalWithinFace

func DiagonalWithinFace(tree pointLoc.LocatesPoints, a, b *dcel.Vertex) bool

func IsLeftOf

func IsLeftOf(v *dcel.Vertex, f *dcel.Face, dc *dcel.DCEL) bool

IsLeftOf returns whether v is to the left or to the right of --the face which neighbors v--, f

func MergeInsert

func MergeInsert(helpers map[*dcel.Edge]helper, f *dcel.Face, e *dcel.Edge,
	v *dcel.Vertex, dc *dcel.DCEL) error

func NewDoubleIntervalTree

func NewDoubleIntervalTree(f *dcel.Face, dc *dcel.DCEL) (pointLoc.LocatesPoints, error)

DoubleIntervalTree converts a monotonized f into a structure that can be pointlocated on to determine if a given point exists inside or outside the face. Because this is a monotone polygon we don't actually make an interval tree, we just make bsts. The intervals we use will be non-overlapping except at vertices

func Split

func Split(inDc *dcel.DCEL) (*dcel.DCEL, map[*dcel.Face]*dcel.Face, error)

Split converts a dcel into another dcel of y monotone shapes, along with a mapping of faces in the new set to faces in the input set.

func Triangulate

func Triangulate(inDc *dcel.DCEL) (*dcel.DCEL, map[*dcel.Face]*dcel.Face, error)

Triangulate uses Monotonization to convert a dcel into a dcel made up of just triangles

func TriangulateSplit

func TriangulateSplit(monotonized *dcel.DCEL, faceMap map[*dcel.Face]*dcel.Face) (*dcel.DCEL, map[*dcel.Face]*dcel.Face, error)

TriangulateSplit takes in a dcel whose faces are already monotone. If there is no existing faceMap, it will create its own.

func VertexType

func VertexType(v *dcel.Vertex, dc *dcel.DCEL) int

Types

type DblIntervalTree

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

func (DblIntervalTree) PointLocate

func (dit DblIntervalTree) PointLocate(vs ...float64) (*dcel.Face, error)

type VertexStack

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

func (*VertexStack) IsEmpty

func (vst *VertexStack) IsEmpty() bool

func (*VertexStack) Pop

func (vst *VertexStack) Pop() *dcel.Vertex

func (*VertexStack) Push

func (vst *VertexStack) Push(vs ...*dcel.Vertex)

type VertexStackItem

type VertexStackItem struct {
	*dcel.Vertex
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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