3 #include "core/cl/geometry_structs.h" 4 #include "core/cl/triangle.h" 8 #include <experimental/optional> 21 ray(
const glm::vec3& position,
const glm::vec3& direction);
23 glm::vec3 get_position()
const;
24 glm::vec3 get_direction()
const;
33 std::experimental::optional<triangle_inter> triangle_intersection(
37 std::experimental::optional<triangle_inter> triangle_intersection(
38 const triangle& tri,
const T* v,
const ray& ray);
43 std::experimental::optional<intersection> intersection_accumulator(
45 size_t triangle_index,
48 const std::experimental::optional<intersection>& current,
49 size_t to_ignore = ~
size_t{0});
52 std::experimental::optional<intersection> ray_triangle_intersection(
54 const size_t* triangle_indices,
55 size_t num_triangle_indices,
58 size_t to_ignore = ~
size_t{0});
61 std::experimental::optional<intersection> ray_triangle_intersection(
66 size_t to_ignore = ~
size_t{0});
68 bool point_intersection(
const glm::vec3& begin,
69 const glm::vec3& point,
72 const glm::vec3* vertices,
76 const glm::vec3& point);
78 float point_triangle_distance_squared(
const triangle& tri,
79 const glm::vec3* vertices,
81 const glm::vec3& point);
I would do this with a struct, but rays have an invariant:
Definition: geometric.h:19
Definition: scene_structs.h:68
Definition: capsule_base.h:9
Definition: triangle_vec.h:16