SPH
Classes | Functions
Bvh.h File Reference
#include "objects/containers/Array.h"
#include "objects/geometry/Box.h"
#include "objects/geometry/Indices.h"
#include "objects/wrappers/AutoPtr.h"
#include "objects/finders/Bvh.inl.h"

Go to the source code of this file.

Classes

class  Ray
 
struct  BvhPrimitive
 
struct  IntersectionInfo
 Holds intormation about intersection. More...
 
class  BvhTriangle
 Trait for finding intersections with a triangle. More...
 
class  BvhSphere
 Trait for finding intersections with a sphere. More...
 
class  BvhBox
 Trait for finding intersections with a axis-aligned box. More...
 
class  Bvh< TBvhObject >
 Simple bounding volume hierarchy. More...
 

Functions

bool intersectBox (const Box &box, const Ray &ray, Float &t_min, Float &t_max)
 Finds intersections of ray with a box. More...
 

Function Documentation

◆ intersectBox()

bool intersectBox ( const Box box,
const Ray ray,
Float t_min,
Float t_max 
)
inline

Finds intersections of ray with a box.

There is always either zero or two intersections. If the ray intersects the box, the function returns true and the intersection distances (near and far distance) are returned as t_min and t_max.

Definition at line 16 of file Bvh.inl.h.