Methods
compute(createInfo) → {Object}
Compute the closest point
Parameters:
Name | Type | Description |
---|---|---|
createInfo |
CreateInfo | The creation info |
- Source:
Returns:
The closet point of type TYPE_POINT
- Type
- Object
(static) fromCollection(p, collection) → {CreateInfo}
Compute the closest point on a collection of object. Supported types can be found at @see{ClosestPointRegistry}.
Be careful, as this might be slow to compute, depending on the number and types of the objects
Parameters:
Name | Type | Description |
---|---|---|
p |
Number | Object | Either the index or value of a TYPE_POINT. The query point |
collection |
Array | Object | Either the indices or values of objects. The objects on which the closest point should be found |
- Source:
Returns:
The creation info
- Type
- CreateInfo
(static) fromObject(p, obj) → {CreateInfo}
Compute the closest point on an object.
Parameters:
Name | Type | Description |
---|---|---|
p |
Number | Object | Either the index or value of a TYPE_POINT. The query point |
obj |
Number | Object | Either the index or value of an object. The object on which the closest point should be found |
- Source:
Returns:
The creation info
- Type
- CreateInfo