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) 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_EMBREE_UNPROJECT_IN_MESH
9#define IGL_EMBREE_UNPROJECT_IN_MESH
10#include "../igl_inline.h"
11#include <Eigen/Core>
12
13#include <vector>
14#include "../Hit.h"
15
16namespace igl
17{
18 namespace embree
19 {
20 // Forward define
21 class EmbreeIntersector;
22
47 template < typename Derivedobj>
49 const Eigen::Vector2f& pos,
50 const Eigen::Matrix4f& model,
51 const Eigen::Matrix4f& proj,
52 const Eigen::Vector4f& viewport,
53 const EmbreeIntersector & ei,
54 Eigen::PlainObjectBase<Derivedobj> & obj,
55 std::vector<igl::Hit > & hits);
57 template < typename Derivedobj>
59 const Eigen::Vector2f& pos,
60 const Eigen::Matrix4f& model,
61 const Eigen::Matrix4f& proj,
62 const Eigen::Vector4f& viewport,
63 const EmbreeIntersector & ei,
64 Eigen::PlainObjectBase<Derivedobj> & obj);
65
66 }
67}
68#ifndef IGL_STATIC_LIBRARY
69# include "unproject_in_mesh.cpp"
70#endif
71#endif
Simple class to wrap Embree's ray tracing functionality.
Definition EmbreeIntersector.h:36
#define IGL_INLINE
Definition igl_inline.h:15
int unproject_in_mesh(const Eigen::Vector2f &pos, const Eigen::Matrix4f &model, const Eigen::Matrix4f &proj, const Eigen::Vector4f &viewport, const EmbreeIntersector &ei, 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...
Definition AABB.h:17