Class triangle

Class Documentation

class legion::core::math::triangle

Data structure for a triangle.

Public Functions

inline triangle(vec3 p0, vec3 p1, vec3 p2)
inline triangle(vec3 p0, vec3 p1, vec3 p2, vec3 normal)
inline float distanceToPoint(const vec3 &p) const

Calculates the closest distance between point p and this triangle.

inline float surface() const

Calculates the size of the surface area.

Public Members

vec3 points[3]
vec3 normal