Hit.h 761 B

12345678910111213141516171819202122232425
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2015 Alec Jacobson <alecjacobson@gmail.com>
  4. // 2014 Christian Schüller <schuellchr@gmail.com>
  5. //
  6. // This Source Code Form is subject to the terms of the Mozilla Public License
  7. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  8. // obtain one at http://mozilla.org/MPL/2.0/.
  9. #ifndef IGL_HIT_H
  10. #define IGL_HIT_H
  11. namespace igl
  12. {
  13. // Reimplementation of the embree::Hit struct from embree1.0
  14. //
  15. // TODO: template on floating point type
  16. struct Hit
  17. {
  18. int id; // primitive id
  19. int gid; // geometry id
  20. float u,v; // barycentric coordinates
  21. float t; // distance = direction*t to intersection
  22. };
  23. }
  24. #endif