Barycentric coordinates of a tetrahedron
问题 I would like to ask for help regarding barycentric coordinates of a tetrahedron: Following an approach I found here: http://www.cdsimpson.net/2014/10/barycentric-coordinates.html i implemented a C++ function for finding barycentric coordinates of a point in a tetrahedron: float ScTP(const Vec &a, const Vec &b, const Vec &c) { // computes scalar triple product return Dot(a, Cross(b, c)); } Vec4f bary_tet(Vec3f a, Vec3f b, Vec3f c, Vec3f d, Vec3f p) { float va, vb, vc, vd, v; Vec3f vap = p - a;