Function opensn::CheckLineIntersectStrip

Function Documentation

bool opensn::CheckLineIntersectStrip(const Vector3 &strip_point0, const Vector3 &strip_point1, const Vector3 &strip_normal, const Vector3 &line_point0, const Vector3 &line_point1, Vector3 &intersection_point, double *distance_to_intersection = nullptr)

Given a strip defined by two points (v0,v1) and a normal, n, (meaning infinite in the direction defined by (v1-v0).cross(n), this function determines if a line, defined from p0 to p1, intersects it. If it does then true is returned and intersection_point contains the point of intersection. If it does not then false is returned and intersection_point remains unchanged.