Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mitsuba::DynamicOctree< Item > Class Template Reference

Generic multiple-reference octree with support for parallel dynamic updates. More...

#include <mitsuba/core/octree.h>

Public Member Functions

 DynamicOctree (const AABB &aabb, uint32_t maxDepth=24)
 Create a new octree. More...
 
void insert (const Item &value, const AABB &coverage)
 Insert an item with the specified cell coverage. More...
 
template<typename Functor >
void lookup (const Point &p, Functor &functor) const
 Execute functor.operator() on all records, which potentially overlap p. More...
 
template<typename Functor >
void searchSphere (const BSphere &sphere, Functor &functor)
 Execute functor.operator() on all records, which potentially overlap bsphere. More...
 
const AABBgetAABB () const
 

Detailed Description

template<typename Item>
class mitsuba::DynamicOctree< Item >

Generic multiple-reference octree with support for parallel dynamic updates.

Based on the excellent implementation in PBRT. Modifications are the addition of a bounding sphere query and support for multithreading.

This class is currently used to implement irradiance caching.

Constructor & Destructor Documentation

template<typename Item>
mitsuba::DynamicOctree< Item >::DynamicOctree ( const AABB aabb,
uint32_t  maxDepth = 24 
)
inline

Create a new octree.

By default, the maximum tree depth is set to 24

Member Function Documentation

template<typename Item>
const AABB& mitsuba::DynamicOctree< Item >::getAABB ( ) const
inline
template<typename Item>
void mitsuba::DynamicOctree< Item >::insert ( const Item &  value,
const AABB coverage 
)
inline

Insert an item with the specified cell coverage.

template<typename Item>
template<typename Functor >
void mitsuba::DynamicOctree< Item >::lookup ( const Point p,
Functor &  functor 
) const
inline

Execute functor.operator() on all records, which potentially overlap p.

template<typename Item>
template<typename Functor >
void mitsuba::DynamicOctree< Item >::searchSphere ( const BSphere sphere,
Functor &  functor 
)
inline

Execute functor.operator() on all records, which potentially overlap bsphere.


The documentation for this class was generated from the following file: