Template Function pmp::projective_transform

Function Documentation

template<typename Scalar>
Vector<Scalar, 3> pmp::projective_transform(const Mat4<Scalar> &m, const Vector<Scalar, 3> &v)

projective transformation of 3D vector v by a 4x4 matrix m: add 1 as 4th component of v, multiply m*v, divide by 4th component