|
SPH
|
Simple bounding volume hierarchy. More...
#include <Bvh.h>
Public Member Functions | |
| Bvh (const Size leafSize=4) | |
| void | build (Array< TBvhObject > &&objects) |
| Contructs the BVH from given set of objects. More... | |
| bool | getFirstIntersection (const Ray &ray, IntersectionInfo &intersection) const |
| Finds the closest intersection of the ray. More... | |
| template<typename TOutIter > | |
| Size | getAllIntersections (const Ray &ray, TOutIter iter) const |
| Returns all intersections of the ray. More... | |
| bool | isOccluded (const Ray &ray) const |
| Returns true if the ray is occluded by some geometry. More... | |
| Box | getBoundingBox () const |
| Returns the bounding box of all objects in BVH. More... | |
Public Member Functions inherited from Noncopyable | |
| Noncopyable ()=default | |
| Noncopyable (const Noncopyable &)=delete | |
| Noncopyable (Noncopyable &&)=default | |
| Noncopyable & | operator= (const Noncopyable &)=delete |
| Noncopyable & | operator= (Noncopyable &&)=default |
Simple bounding volume hierarchy.
Interface for finding an intersection of given ray with a set of geometric objects. Currently very limited and not very optimized. Bvh is explicitly specialized for BvhSphere and BvhBox; if other geometric primitives are needed, either add the specialization to cpp, or move the implementation to header.
| bool Bvh< TBvhObject >::getFirstIntersection | ( | const Ray & | ray, |
| IntersectionInfo & | intersection | ||
| ) | const |