intersect.cpp 584 B

123456789101112131415161718192021222324252627
  1. #include "../precompiled.hpp"
  2. #include <glm/glm.hpp>
  3. #include <glm/gtx/intersect.hpp>
  4. namespace glm{
  5. namespace test
  6. {
  7. void main_gtx_intesect()
  8. {
  9. glm::vec3 Origin = glm::vec3(0.25f, 0.33f, 10.f);
  10. glm::vec3 Direction = glm::vec3(0.0f, 0.0f, -1.f);
  11. glm::vec3 Vect0 = glm::vec3(0.0f, 0.0f, 0.f);
  12. glm::vec3 Vect1 = glm::vec3(1.0f, 0.0f, 0.f);
  13. glm::vec3 Vect2 = glm::vec3(0.0f, 1.0f, 0.f);
  14. glm::vec3 Position(0.0f);
  15. bool Result = intersectRayTriangle(
  16. Origin, Direction,
  17. Vect0, Vect1, Vect2,
  18. Position);
  19. bool End = true;
  20. }
  21. }//namespace test
  22. }//namespace glm