Function opensn::CheckPlaneTetIntersect

Function Documentation

bool opensn::CheckPlaneTetIntersect(const Vector3 &plane_normal, const Vector3 &plane_point, const std::vector<Vector3> &tet_points)

This functions checks the intersection of a plane with a tetrahedron. The equation of a plane is nx(x-x0) + ny(y-y0) + nz(z-z0) = 0 Where the plane normal is (nx,ny,nz) and the plane point is (x0,y0,z0). If we form a dot product between the normal and a vector (x-x0,y-y0,z-z0) then sign of the result gives the sense to the surface. Therefore, if we encounter differing senses then the plane is indeed intersecting.