libigl v2.5.0
Loading...
Searching...
No Matches
unproject_in_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) 2015 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_IN_MESH
9#define IGL_UNPROJECT_IN_MESH
10#include "igl_inline.h"
11#include <Eigen/Core>
12
13#include <vector>
14#include "Hit.h"
15
16namespace igl
17{
34 template < typename DerivedV, typename DerivedF, typename Derivedobj>
36 const Eigen::Vector2f& pos,
37 const Eigen::Matrix4f& model,
38 const Eigen::Matrix4f& proj,
39 const Eigen::Vector4f& viewport,
40 const Eigen::MatrixBase<DerivedV> & V,
41 const Eigen::MatrixBase<DerivedF> & F,
42 Eigen::PlainObjectBase<Derivedobj> & obj,
43 std::vector<igl::Hit > & hits);
45 template < typename DerivedV, typename DerivedF, typename Derivedobj>
47 const Eigen::Vector2f& pos,
48 const Eigen::Matrix4f& model,
49 const Eigen::Matrix4f& proj,
50 const Eigen::Vector4f& viewport,
51 const Eigen::MatrixBase<DerivedV> & V,
52 const Eigen::MatrixBase<DerivedF> & F,
53 Eigen::PlainObjectBase<Derivedobj> & obj);
59 template < typename Derivedobj>
61 const Eigen::Vector2f& pos,
62 const Eigen::Matrix4f& model,
63 const Eigen::Matrix4f& proj,
64 const Eigen::Vector4f& viewport,
65 const std::function<
66 void(
67 const Eigen::Vector3f&,
68 const Eigen::Vector3f&,
69 std::vector<igl::Hit> &)
70 > & shoot_ray,
71 Eigen::PlainObjectBase<Derivedobj> & obj,
72 std::vector<igl::Hit > & hits);
73}
74#ifndef IGL_STATIC_LIBRARY
75# include "unproject_in_mesh.cpp"
76#endif
77#endif
78
#define IGL_INLINE
Definition igl_inline.h:15
Definition AABB.h:17
int unproject_in_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, Eigen::PlainObjectBase< Derivedobj > &obj, std::vector< igl::Hit > &hits)
Unproject a screen location (using current opengl viewport, projection, and model view) to a 3D posit...