// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2013 Alec Jacobson // // This Source Code Form is subject to the terms of the Mozilla Public License // v. 2.0. If a copy of the MPL was not distributed with this file, You can // obtain one at http://mozilla.org/MPL/2.0/. #include "unproject_to_zero_plane.h" #include "gl.h" #include "project.h" #include "unproject.h" IGL_INLINE void igl::opengl2::unproject_to_zero_plane( const double winX, const double winY, double* objX, double* objY, double* objZ) { double winOrigin[3]; igl::opengl2::project(0,0,0,&winOrigin[0],&winOrigin[1],&winOrigin[2]); return igl::opengl2::unproject(winX, winY, winOrigin[2], objX, objY, objZ); } template IGL_INLINE void igl::opengl2::unproject_to_zero_plane( const Eigen::PlainObjectBase & win, Eigen::PlainObjectBase & obj) { return unproject_to_zero_plane(win(0),win(1), &obj.data()[0], &obj.data()[1], &obj.data()[2]); } #ifdef IGL_STATIC_LIBRARY // Explicit template instantiation // generated by autoexplicit.sh template void igl::opengl2::unproject_to_zero_plane, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); template void igl::opengl2::unproject_to_zero_plane, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); template void igl::opengl2::unproject_to_zero_plane, Eigen::Matrix >(Eigen::PlainObjectBase > const&, Eigen::PlainObjectBase >&); #endif