libigl v2.5.0
Loading...
Searching...
No Matches
unproject.h
Go to the documentation of this file.
1// This file is part of libigl, a simple c++ geometry processing library.
2//
3// Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
4//
5// This Source Code Form is subject to the terms of the Mozilla Public License
6// v. 2.0. If a copy of the MPL was not distributed with this file, You can
7// obtain one at http://mozilla.org/MPL/2.0/.
8#ifndef IGL_UNPROJECT_H
9#define IGL_UNPROJECT_H
10#include "igl_inline.h"
11#include <Eigen/Core>
12namespace igl
13{
24 template <
25 typename Derivedwin,
26 typename Derivedmodel,
27 typename Derivedproj,
28 typename Derivedviewport,
29 typename Derivedscene>
31 const Eigen::MatrixBase<Derivedwin>& win,
32 const Eigen::MatrixBase<Derivedmodel>& model,
33 const Eigen::MatrixBase<Derivedproj>& proj,
34 const Eigen::MatrixBase<Derivedviewport>& viewport,
35 Eigen::PlainObjectBase<Derivedscene> & scene);
37 template <typename Scalar>
38 IGL_INLINE Eigen::Matrix<Scalar,3,1> unproject(
39 const Eigen::Matrix<Scalar,3,1>& win,
40 const Eigen::Matrix<Scalar,4,4>& model,
41 const Eigen::Matrix<Scalar,4,4>& proj,
42 const Eigen::Matrix<Scalar,4,1>& viewport);
43}
44
45#ifndef IGL_STATIC_LIBRARY
46# include "unproject.cpp"
47#endif
48
49#endif
#define IGL_INLINE
Definition igl_inline.h:15
Definition AABB.h:17
void unproject(const Eigen::MatrixBase< Derivedwin > &win, const Eigen::MatrixBase< Derivedmodel > &model, const Eigen::MatrixBase< Derivedproj > &proj, const Eigen::MatrixBase< Derivedviewport > &viewport, Eigen::PlainObjectBase< Derivedscene > &scene)
Eigen reimplementation of gluUnproject.