Documentation
¶
Index ¶
- func Delaunay(pts [][2]float64) [][3]int32
- func FreeTriangulateIO(t *triangulateIO)
- func NewOptions() *options
- func NewTriangulateIO() *triangulateIO
- func Triangulate(in *triangulateIO, opts *options, verbose bool) *triangulateIO
- func Voronoi(pts [][2]float64) ([][2]float64, [][2]int32, []int32, [][2]float64)
- type SegmentSplitting
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FreeTriangulateIO ¶
func FreeTriangulateIO(t *triangulateIO)
func NewOptions ¶
func NewOptions() *options
NewOptions returns a new options struct with default parameters
func NewTriangulateIO ¶
func NewTriangulateIO() *triangulateIO
func Triangulate ¶
func Triangulate(in *triangulateIO, opts *options, verbose bool) *triangulateIO
Triangulate performs constrained Delaunay triangulation. Constraints and quality options can be set using the second argument. Holes and segments that must appear in the triangulation can be set using methods (SetSegments() and SetHoles()) in the input triangulateIO struct.
Note that FreeTriangulateIO() has to be called explicitly on the in and out to release the memory.
func Voronoi ¶
Voronoi computes the Voronoi diagram of a given set of points It returns a set of Voronoi vertices, a set of edges between the points, as well as infinite which can occur around the boundary (defined by rayOrigins which indexes into the vertices, and rayDirs which provides the direction).
Types ¶
type SegmentSplitting ¶
type SegmentSplitting uint8
const ( SplittingAllowed SegmentSplitting = 0 + iota NoSplittingInBoundary NoSplitting )