Hermes
hermes::GeometricQueries Struct Reference

Static Public Member Functions

static point3 closestPoint (const bbox3 &box, const point3 &p)
 
static bool intersect (const Plane &pl, const Line &l, point3 &p)
 
static bool intersect (const Sphere &s, const Line &l, point3 &p1, point3 &p2)
 intersection test More...
 
static bool intersect (const bbox2 &box, const Ray2 &ray, real_t &hit1, real_t &hit2, real_t *normal=nullptr)
 intersection test More...
 
static bool intersect (const bbox3 &box, const Ray3 &ray, real_t &hit1, real_t &hit2)
 intersection test More...
 
static bool intersect (const bbox3 &box, const Ray3 &ray, real_t &hit1)
 intersection test More...
 
static bool intersect (const hermes::Line2 &line, const ray2 &ray)
 Intersects a line by a ray. More...
 

Member Function Documentation

◆ closestPoint()

point3 hermes::GeometricQueries::closestPoint ( const bbox3 box,
const point3 p 
)
static
Parameters
box
p
Returns

◆ intersect() [1/6]

bool hermes::GeometricQueries::intersect ( const bbox2 box,
const Ray2 ray,
real_t hit1,
real_t hit2,
real_t normal = nullptr 
)
static

intersection test

Parameters
box[in]
ray[in]
hit1[out] first intersection
hit2[out] second intersection
normal[out | optional] collision normal

bbox2D / Ray intersection test.

hit1 and hit2 are in the ray's parametric coordinate.

hit1 = hit2 if a single point is found.

/return true if intersectiton exists

◆ intersect() [2/6]

bool hermes::GeometricQueries::intersect ( const bbox3 box,
const Ray3 ray,
real_t hit1 
)
static

intersection test

Parameters
box[in]
ray[in]
hit1[out] closest intersection

BBox / Ray3 intersection test. Computes the closest intersection from the ray's origin.

hit1 in in the ray's parametric coordinate.

/return true if intersection exists

◆ intersect() [3/6]

bool hermes::GeometricQueries::intersect ( const bbox3 box,
const Ray3 ray,
real_t hit1,
real_t hit2 
)
static

intersection test

Parameters
box[in]
ray[in]
hit1[out] first intersection
hit2[out] second intersection

BBox / Ray3 intersection test.

hit1 and hit2 are in the ray's parametric coordinate.

hit1 = hit2 if a single point is found.

/return true if intersectiton exists

◆ intersect() [4/6]

bool hermes::GeometricQueries::intersect ( const hermes::Line2 line,
const ray2 ray 
)
static

Intersects a line by a ray.

Parameters
line
ray
Returns
true if intersection exists

◆ intersect() [5/6]

bool hermes::GeometricQueries::intersect ( const Plane pl,
const Line l,
point3 p 
)
static
Parameters
pl
l
p
Returns

◆ intersect() [6/6]

bool hermes::GeometricQueries::intersect ( const Sphere s,
const Line l,
point3 p1,
point3 p2 
)
static

intersection test

Parameters
s[in] sphere
l[in] line
p1[out] first intersection
p2[out] second intersection

Sphere / Line intersection test

p1 = p2 if line is tangent to sphere

/return true if intersection exists


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