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

Function Documentation

inline float legion::core::math::pointToTriangle(const vec3 &p, const vec3 &triPoint0, const vec3 &triPoint1, const vec3 &triPoint2, const vec3 &triNormal, bool debug = false)

Calculates the distance between a point and a triangle plane.

Parameters
  • p: - The point

  • triPoint0: - The first triangle point

  • triPoint1: - The second triangle point

  • triPoint2: - The last triangle point

  • triNormal: - The triangle plane normal