Class: ClosestPointRegistry

algeobra~ClosestPointRegistry()

Registry for closest point operations on types Currently supported: Point, Line, Vector, Arc, Line strip, Polygon, Bezier (max deg 2), Bezier Curve (max deg 2), Ellipse

Constructor

new ClosestPointRegistry()

Source:

Methods

(static) closestPoint(p, obj) → {Object}

Compute the closest point for the given point and object
Parameters:
Name Type Description
p Object The input point
obj Object The typed object
Source:
Returns:
The closest point
Type
Object

(static) getClosestPointFunction(type) → {undefined|function}

Get the closest point function for a given type
Parameters:
Name Type Description
type String The object type
Source:
Returns:
Function computing the closest point for the given type, if it exists
Type
undefined | function

(static) setClosestPointFunction(type, closestPoint)

Set the closest point function for a given type
Parameters:
Name Type Description
type String The object type
closestPoint function Function computing the closest point for the given type
Source: