Function legion::core::math::pointToTriangle(const vec3&, const vec3&, const vec3&, const vec3&)

Function Documentation

inline float legion::core::math::pointToTriangle(const vec3 &p, const vec3 &triPoint0, const vec3 &triPoint1, const vec3 &triPoint2)

Calculates the distance between a point and a triangle plane.

Calculates the normal of the triangle plane and calls pointToTriangle with normal

Parameters
  • p: - The point

  • triPoint0: - The first triangle point

  • triPoint1: - The second triangle point

  • triPoint2: - The last triangle point