snapLocationToEdge Method

Adjust the location to the closest edge of the triangle if within either given tolerance.

snapLocationToEdge(location: TriangleLocationDetail, distanceTolerance: numberGeometry.smallMetricDistance, parameterTolerance: numberGeometry.smallFloatingPoint): boolean

@returns whether the location was adjusted

Parameter Type Description
location TriangleLocationDetail details of a point in the plane of the triangle (note that location.local and
location.world possibly updated to lie on the triangle closest edge)
distanceTolerance number absolute distance tolerance (or zero to ignore)
parameterTolerance number barycentric coordinate fractional tolerance (or zero to ignore)

Returns - boolean

whether the location was adjusted

Defined in

Last Updated: 28 October, 2024