Struct Barycentrics

Struct Documentation

struct Barycentrics

Barycentric coordinates of the intersection point.

float u = b_uv.x();
float v = b_uv.y();
float w = 1.0 - u - v;

// v1 - v3: vertices of face
// p: intersection point
Vector3f p = u * v1 + v * v2 + w * v3

Public Members

Vector2f b_uv