Provides methods for efficiently finding the closest point on
the surface of a mesh. An octree algorithm is used to find the
closest point.
def OpenMaya.MMeshIntersector.getClosestPoint |
( |
| ) |
|
getClosestPoint(referencePoint, maxDistance=sys.float_info.max) -> MPointOnMesh
Finds the closest point within 'maxDistance' of the reference point
(MPoint) which lies on the surface of the mesh. The reference point
will first be transformed by the matrix passed in the create() call,
so if, for example, you want to specify reference points in world
space then the matrix passed to create() should provide the mapping
from world space to the mesh's object space.
Returns an MPointOnMesh object if a closest point is found, or None
if no closest point is found (e.g. referencePoint is not within
maxDistance of the mesh).
Raises ValueError if create() has not yet been called for this
intersector.