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) 2014 Daniele Panozzo <daniele.panozzo@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_ONTO_MESH_H
9#define IGL_EMBREE_UNPROJECT_ONTO_MESH_H
10#include "../igl_inline.h"
11#include <Eigen/Core>
12
13#include <vector>
14
15namespace igl
16{
17 namespace embree
18 {
19 // Forward define
20 class EmbreeIntersector;
33 const Eigen::Vector2f& pos,
34 const Eigen::Matrix4f& model,
35 const Eigen::Matrix4f& proj,
36 const Eigen::Vector4f& viewport,
37 const EmbreeIntersector & ei,
38 int& fid,
39 Eigen::Vector3f& bc);
43 const Eigen::Vector2f& pos,
44 const Eigen::MatrixXi& F,
45 const Eigen::Matrix4f& model,
46 const Eigen::Matrix4f& proj,
47 const Eigen::Vector4f& viewport,
48 const EmbreeIntersector & ei,
49 int& fid,
50 int& vid);
51 }
52}
53#ifndef IGL_STATIC_LIBRARY
54# include "unproject_onto_mesh.cpp"
55#endif
56#endif
Simple class to wrap Embree's ray tracing functionality.
Definition EmbreeIntersector.h:36
#define IGL_INLINE
Definition igl_inline.h:15
bool unproject_onto_mesh(const Eigen::Vector2f &pos, const Eigen::Matrix4f &model, const Eigen::Matrix4f &proj, const Eigen::Vector4f &viewport, const EmbreeIntersector &ei, int &fid, Eigen::Vector3f &bc)
Unproject a screen location (using the given model, proj and viewport) to find the first hit on a mes...
Definition AABB.h:17