Function pfield::getClosestPointOnMesh

Function Documentation

bool pfield::getClosestPointOnMesh(const MeshCollisionData &meshData, const Eigen::Vector3d &pointInMeshFrame, Eigen::Vector3d &closestPoint)

Finds the closest point on the mesh to the given point.

Note

Returns true if successful, false otherwise and populates closestPoint accordingly

Parameters:
  • meshData[in] The mesh collision data

  • pointInMeshFrame[in] The point to find the closest point to, expressed in the mesh’s local frame

  • closestPoint[out] Output parameter to hold the closest point on the mesh

Returns:

true if closest point was successfully found