X-Git-Url: https://git.lukelau.me/?p=opengl.git;a=blobdiff_plain;f=model.hpp;fp=model.hpp;h=e7ad29cd2c9f97b0cf3b414c9e1c89aaf7d367b6;hp=aaf647af3c83c2b89b6e39e0a53bbe28a0c6ed40;hb=9886c33eb8cd31f28234585718410cd51aef2a4c;hpb=d2a4cfcd292f5bc422a025d43855e5f4f21fb161 diff --git a/model.hpp b/model.hpp index aaf647a..e7ad29c 100644 --- a/model.hpp +++ b/model.hpp @@ -79,7 +79,12 @@ class Model { Node* find(const aiString name) const; Node* find(const std::string &name) const; - std::pair closestVertex(Model::Node &node, glm::vec3 a, glm::vec3 b, glm::mat4 parentTrans = glm::mat4(1)) const; + struct VertexLookup { + glm::vec3 pos; + int meshIdx, vertIdx; + float distance; + }; + VertexLookup closestVertex(Model::Node &node, glm::vec3 a, glm::vec3 b, glm::mat4 parentTrans = glm::mat4(1)) const; std::vector meshes;