19namespace ProjectPointOnMesh
22 std::vector<const MeshLib::Element*>
const& elements,
28 for (
auto const* e : elements)
30 auto const* nodes = e->getNodes();
33 auto const& a = *nodes[0];
34 auto const& b = *nodes[1];
35 auto const& c = *nodes[2];
36 if (!is_right_of(a, b) && !is_right_of(b, c) && !is_right_of(c, a))
43 auto const& a = *nodes[0];
44 auto const& b = *nodes[1];
45 auto const& c = *nodes[2];
46 auto const& d = *nodes[3];
47 if (!is_right_of(a, b) && !is_right_of(b, c) &&
48 !is_right_of(c, d) && !is_right_of(d, a))
67 return (d - (node[0] * n[0] + node[1] * n[1])) / n[2];
Definition of analytical geometry functions.
Definition of the Point3d class.
Definition of the Quad class.
Definition of the Tri class.
Eigen::Vector3d const & asEigenVector3d() const
virtual const Node * getNode(unsigned idx) const =0
static Eigen::Vector3d getSurfaceNormal(Element const &e)
Returns the surface normal of a 2D element.
Orientation getOrientation(MathLib::Point3d const &p0, MathLib::Point3d const &p1, MathLib::Point3d const &p2)