28 #ifndef HERMES_GEOMETRY_QUERIES_H
29 #define HERMES_GEOMETRY_QUERIES_H
31 #include <hermes/geometry/bbox.h>
34 #include <hermes/geometry/utils.h>
36 #include <hermes/geometry/line.h>
37 #include <hermes/geometry/plane.h>
38 #include <hermes/geometry/sphere.h>
39 #include <hermes/common/result.h>
140 const i32 dir_is_neg[3],
141 real_t max_t = Constants::real_infinity);
148 const ray3 &ray,
real_t *second_hit =
nullptr);
Represents a 2D line by a point and a vector.
Definition: line.h:37
Represents a line by a point and a vector.
Definition: line.h:87
Holds a valid object or an error.
Definition: result.h:56
float real_t
default floating point type
Definition: defs.h:75
int32_t i32
32 bit size integer type
Definition: defs.h:83
Set of geometric predicates.
Definition: queries.h:124
static Result< real_t > intersect(const hermes::Line2 &line, const ray2 &ray)
Intersects a line by a ray.
Definition: queries.cpp:171
static Result< real_t > intersect(const hermes::bbox3 &bounds, const ray3 &ray, const hermes::vec3 &inv_dir, const i32 dir_is_neg[3], real_t max_t=Constants::real_infinity)
static bool intersect(const Plane &pl, const Line &l, point3 &p)
Definition: queries.cpp:47
static point3 closestPoint(const bbox3 &box, const point3 &p)
Definition: queries.cpp:41
Geometric vector classes.