triangulation

package
v0.0.0-...-bdc3219 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BowyerWatson

func BowyerWatson(pointsDirty []vector.Vector2) mesh.Mesh

func ConstrainedBowyerWatson

func ConstrainedBowyerWatson(pointsDirty []vector.Vector2, constraints []Constraint) mesh.Mesh

func SuperTriangle

func SuperTriangle(points []vector.Vector2) []vector.Vector2

SuperTriangle large enough to completely contain all the points in pointList

TODO: This is just a guess. I've never really taken time to confirm this is a valid construction

Types

type Constraint

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

func NewConstraint

func NewConstraint(shape []vector.Vector2) Constraint

type Edge

type Edge [2]int

func (Edge) Connected

func (e Edge) Connected(other Edge) bool

func (Edge) Length

func (e Edge) Length(points []vector.Vector2) float64

type SortByXComponent

type SortByXComponent []vector.Vector2

func (SortByXComponent) Len

func (a SortByXComponent) Len() int

func (SortByXComponent) Less

func (a SortByXComponent) Less(i, j int) bool

func (SortByXComponent) Swap

func (a SortByXComponent) Swap(i, j int)

type Triangle

type Triangle [3]int

func (Triangle) CounterClockwise

func (t Triangle) CounterClockwise(points []vector.Vector2) bool

func (Triangle) Edges

func (t Triangle) Edges() []Edge

func (Triangle) InsideCircumcircle

func (t Triangle) InsideCircumcircle(p vector.Vector2, points []vector.Vector2) bool

func (Triangle) Intersects

func (t Triangle) Intersects(points []vector.Vector2, start, end vector.Vector2) []vector.Vector2

Jump to

Keyboard shortcuts

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