Class: Delaunay

ol.source. Delaunay

Delaunay source Calculate a delaunay triangulation from points in a source


new Delaunay(options)

Parameters:
Name Type Description
options *

extend ol/source/Vector options

Properties
Name Type Description
source ol/source/Vector

the source that contains the points

Methods


_addTriangle(pts)

Add a new triangle in the source

Parameters:
Name Type Description
pts Array.<ol/coordinates>

_onAddNode(e)

A new point has been added

Parameters:
Name Type Description
e ol/source/VectorEvent

_onRemoveNode(evt)

A point has been removed

Parameters:
Name Type Description
evt ol/source/Vector.Event

_ptInTriangle(pt, triangle)

Test pt is a triangle's node

Parameters:
Name Type Description
pt ol.coordinate
triangle Array.<ol.coordinate>
Returns:
Type
boolean

calculateVoronoi(border)

Get Voronoi

Parameters:
Name Type Description
border boolean

include border, default false

Returns:
Type
Array.<ol.geom.Polygon>

clear(opt_fast)

Clear source (and points)

Parameters:
Name Type Description
opt_fast boolean

flipTriangles()

Flipping algorithme: test new inserted triangle and flip


getCircumCircle(triangle)

Calculate the circumcircle of a triangle

Parameters:
Name Type Description
triangle Array.<ol.coordinate>
Returns:
Type
*

getNodes()

Get nodes


getNodesAt()

Get nodes at a point


getNodeSource()

Get nodes source


getTrianglesAt()

Get triangles at a point


inCircle(coord, triangle)

Test if coord is within triangle's circumcircle

Parameters:
Name Type Description
coord ol.coordinate
triangle Array.<ol.coordinate>
Returns:
Type
boolean

intersectSegs(d1, d2)

Test intersection beetween 2 segs

Parameters:
Name Type Description
d1 Array.<ol.coordinates>
d2 Array.<ol.coordinates>
Returns:
Type
bbolean

listpt(pts)

List points in a triangle (assume points get an id) for debug purposes

Parameters:
Name Type Description
pts Array.<ol.coordinate>
Returns:

ids list

Type
String