|
cgv
|
An interface to define objects that are intersectable with a ray. More...
#include <bvh.h>
Public Member Functions | |
| virtual cgv::box3 | get_bounds () const =0 |
| Return the axis-aligned bounding box of the primitive. | |
| virtual bool | intersect (const cgv::ray3 &ray, ray_intersection_info &info) const =0 |
| Test if the object is intersected by the given ray. | |
An interface to define objects that are intersectable with a ray.
|
inlinevirtual |
|
pure virtual |
Test if the object is intersected by the given ray.
The info struct collects additional information about the intersection. The ray parameter t must be set to ensure correct behaviour in any potential outside traversal procedures. The remaining data is optional and may be set as available by the primitive and needed by the caller site.
| ray | The ray to intersect with. |
| info | The ray_intersection_info to collect additional intersection data. |
Referenced by cgv::data::bvh::closest_intersection().