Template Function larflow::reco::pointRayProjection

Function Documentation

template<class T>
T larflow::reco::pointRayProjection(const std::vector<T> &start, const std::vector<T> &dir, const std::vector<T> &testpt)

get projected distance from start of ray to test point

calculation from: http://mathworld.wolfram.com/Point-LineDistance3-Dimensional.html

Return
projected distance
Parameters
  • start: 3D start point of ray
  • dir: 3D direction of ray (doesn’t need to be unit normalized)
  • testpt: Test point