Hermes
hermes::GeometricPredicates Struct Reference

Set of geometric predicates. More...

Static Public Member Functions

static Result< real_tintersect (const hermes::Line2 &line, const ray2 &ray)
 Intersects a line by a ray. More...
 
static Result< real_tintersect (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 Result< real_tintersect (const hermes::bbox3 &bounds, const ray3 &ray, real_t *second_hit=nullptr)
 
static Result< real_tintersect (const point3 &p1, const point3 &p2, const point3 &p3, const Ray3 &ray, real_t *b1=nullptr, real_t *b2=nullptr)
 
static Result< real_tintersect (const Plane &plane, const Ray3 &ray)
 

Detailed Description

Set of geometric predicates.

Member Function Documentation

◆ intersect() [1/5]

static Result<real_t> hermes::GeometricPredicates::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
Parameters
bounds
ray
inv_dir
dir_is_neg
max_t
Returns

◆ intersect() [2/5]

Result< real_t > hermes::GeometricPredicates::intersect ( const hermes::bbox3 bounds,
const ray3 ray,
real_t second_hit = nullptr 
)
static
Parameters
bounds
ray
second_hit
Returns

◆ intersect() [3/5]

Result< real_t > hermes::GeometricPredicates::intersect ( const hermes::Line2 line,
const ray2 ray 
)
static

Intersects a line by a ray.

Parameters
line
ray
Returns
the ray parametric coordinate of the intersection

◆ intersect() [4/5]

Result< real_t > hermes::GeometricPredicates::intersect ( const Plane plane,
const Ray3 ray 
)
static
Parameters
plane
ray
Returns

◆ intersect() [5/5]

Result< real_t > hermes::GeometricPredicates::intersect ( const point3 p1,
const point3 p2,
const point3 p3,
const Ray3 ray,
real_t b1 = nullptr,
real_t b2 = nullptr 
)
static

BBox / Ray3 intersection test. b1 and b2, if not null, receive the barycentric coordinates of the intersection point.

Parameters
p1[in] first triangle's vertex
p2[in] second triangle's vertex
p3[in] third triangle's vertex
ray[in]
tHit[out] intersection (parametric coordinate)
b1[out] barycentric coordinate
b2[out] barycentric coordinate return true if intersection exists

The documentation for this struct was generated from the following files: