19 namespace ProjectPointOnMesh
24 auto is_right_of = [&node](
Node const& a,
Node const& b) {
29 for (
auto const* e : elements)
31 auto const* nodes = e->getNodes();
34 auto const& a = *nodes[0];
35 auto const& b = *nodes[1];
36 auto const&
c = *nodes[2];
37 if (!is_right_of(a, b) && !is_right_of(b,
c) && !is_right_of(
c, a))
44 auto const& a = *nodes[0];
45 auto const& b = *nodes[1];
46 auto const&
c = *nodes[2];
47 auto const& d = *nodes[3];
48 if (!is_right_of(a, b) && !is_right_of(b,
c) &&
49 !is_right_of(
c, d) && !is_right_of(d, a))
60 Eigen::Vector3d
const v =
61 Eigen::Map<Eigen::Vector3d const>(node.
getCoords()) -
64 return node[2] - n.dot(v) * n[2];
Definition of analytical geometry functions.
Definition of the Point3d class.
Definition of the Quad class.
Definition of the Tri class.
const T * getCoords() 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 getOrientationFast(MathLib::Point3d const &p0, MathLib::Point3d const &p1, MathLib::Point3d const &p2)
double getElevation(Element const &element, Node const &node)
Element const * getProjectedElement(std::vector< const Element * > const &elements, Node const &node)