triangulate

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyMetadata = nodata{}

EmptyMetadata can be used to indicate that this point or line does not have any metadata associated with it.

Functions

This section is empty.

Types

type Constrainer

type Constrainer interface {
	Triangulator

	// AddConstraints adds constraint lines to the triangulation, this may require
	// the triangulation to be recalculated.
	// Data is any matadata to be attached to each constraint. The number of data
	// elements must be less then the number of lines. The EmptyMetadata value can be used to
	// indicate no metadata for that constraint.
	AddConstraint(ctx context.Context, constraints []geom.Line, data []interface{}) error
}

Constrainer is a Triangulator that can take set of points and ensure that the given set of edges (the constraints) exist in the triangulation.

type Triangulator

type Triangulator interface {

	// SetPoints sets the nodes to be used in the triangulations
	// the number of data elements should be equal to or less then
	// the number of the points, where the index of the data maps
	// to the point. The EmptyMetadata value can be used to indicate no metadata
	// for that point.
	SetPoints(ctx context.Context, pts []geom.Point, data []interface{})

	// Triangles returns the triangles that were produced by the triangulation
	// If the triangulation uses a frame the includeFrame should be used to
	// determine if the triangles touching the frame should be included or not.
	Triangles(ctx context.Context, includeFrame bool) []geom.Triangle
}

Triangulator describes an object that can take a set of points and produce a triangulation.

Directories

Path Synopsis
quadedge
Package quadedge describes a quadedge object used to build up the triangulation A quadedge is made up of four directional edges
Package quadedge describes a quadedge object used to build up the triangulation A quadedge is made up of four directional edges

Jump to

Keyboard shortcuts

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