libigl v2.5.0
Loading...
Searching...
No Matches
unproject_onto_mesh.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) 2016 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_ONTO_MESH
9#define IGL_UNPROJECT_ONTO_MESH
10#include "igl_inline.h"
11#include "Hit.h"
12#include <Eigen/Core>
13#include <functional>
14
15namespace igl
16{
40 template < typename DerivedV, typename DerivedF, typename Derivedbc>
42 const Eigen::Vector2f& pos,
43 const Eigen::Matrix4f& model,
44 const Eigen::Matrix4f& proj,
45 const Eigen::Vector4f& viewport,
46 const Eigen::MatrixBase<DerivedV> & V,
47 const Eigen::MatrixBase<DerivedF> & F,
48 int & fid,
49 Eigen::PlainObjectBase<Derivedbc> & bc);
53 template <typename Derivedbc>
55 const Eigen::Vector2f& pos,
56 const Eigen::Matrix4f& model,
57 const Eigen::Matrix4f& proj,
58 const Eigen::Vector4f& viewport,
59 const std::function<
60 bool(
61 const Eigen::Vector3f&,
62 const Eigen::Vector3f&,
63 igl::Hit &)
64 > & shoot_ray,
65 int & fid,
66 Eigen::PlainObjectBase<Derivedbc> & bc);
67}
68#ifndef IGL_STATIC_LIBRARY
69# include "unproject_onto_mesh.cpp"
70#endif
71#endif
72
73
#define IGL_INLINE
Definition igl_inline.h:15
Definition AABB.h:17
bool unproject_onto_mesh(const Eigen::Vector2f &pos, const Eigen::Matrix4f &model, const Eigen::Matrix4f &proj, const Eigen::Vector4f &viewport, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F, int &fid, Eigen::PlainObjectBase< Derivedbc > &bc)
Unproject a screen location (using current opengl viewport, projection, and model view) to a 3D posit...
Reimplementation of the embree::Hit struct from embree1.0.
Definition Hit.h:18