Function swri_geometry_util::ClosestPointToLines

Function Documentation

bool swri_geometry_util::ClosestPointToLines(const tf2::Vector3 &a1, const tf2::Vector3 &a2, const tf2::Vector3 &b1, const tf2::Vector3 &b2, tf2::Vector3 &point)

Find closest point to two 3D lines.

Parameters:
  • a1[in] First point on line 1.

  • a2[in] Second point on line 1.

  • b1[in] First point on line 2.

  • b2[in] Second point on line 2.

  • point[out] The closest point to both lines.

Returns:

True unless a1 == a2, b1 == b2, or lines are parallel.