#include "unproject_on_plane.h" #include "projection_constraint.h" #include template < typename DerivedUV, typename DerivedM, typename DerivedVP, typename DerivedP, typename DerivedZ> void igl::unproject_on_plane( const Eigen::MatrixBase & UV, const Eigen::MatrixBase & M, const Eigen::MatrixBase & VP, const Eigen::MatrixBase & P, Eigen::PlainObjectBase & Z) { using namespace Eigen; typedef typename DerivedZ::Scalar Scalar; Matrix A; Matrix B; projection_constraint(UV,M,VP,A,B); Matrix AA; AA.topRows(2) = A.template cast(); AA.row(2) = P.head(3).template cast(); Matrix BB; BB.head(2) = B.template cast(); BB(2) = -P(3); Z = AA.fullPivHouseholderQr().solve(BB); } #ifdef IGL_STATIC_LIBRARY // Explicit template instantiation // generated by autoexplicit.sh template void igl::unproject_on_plane, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::PlainObjectBase >&); #endif