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

Generic single-reference static octree. More...

#include <mitsuba/core/octree.h>

Classes

struct  LabelOrdering
 
struct  OctreeNode
 

Public Member Functions

 StaticOctree (const AABB &aabb, uint32_t maxDepth=24, uint32_t maxItems=8)
 Create a new octree. More...
 
 ~StaticOctree ()
 Release all memory. More...
 
void build ()
 

Protected Member Functions

AABB childBounds (int child, const AABB &nodeAABB, const Point &center) const
 Return the AABB for a child of the specified index. More...
 
OctreeNodebuild (const AABB &aabb, uint32_t depth, uint32_t *base, uint32_t *temp, uint32_t *start, uint32_t *end)
 
 StaticOctree ()
 

Protected Attributes

AABB m_aabb
 
std::vector< Item > m_items
 
uint32_t m_maxDepth
 
uint32_t m_maxItems
 
OctreeNodem_root
 

Detailed Description

template<typename Item, typename NodeData>
class mitsuba::StaticOctree< Item, NodeData >

Generic single-reference static octree.

This class is currently used to implement BSSRDF evaluation with irradiance point clouds.

The Item template parameter must implement a function named getPosition() that returns a Point.

Constructor & Destructor Documentation

template<typename Item , typename NodeData >
mitsuba::StaticOctree< Item, NodeData >::StaticOctree ( const AABB aabb,
uint32_t  maxDepth = 24,
uint32_t  maxItems = 8 
)
inline

Create a new octree.

Parameters
maxDepthMaximum tree depth (24 by default)
maxItemsMaximum items per interior node (8 by default)

By default, the maximum tree depth is set to 16

template<typename Item , typename NodeData >
mitsuba::StaticOctree< Item, NodeData >::~StaticOctree ( )
inline

Release all memory.

template<typename Item , typename NodeData >
mitsuba::StaticOctree< Item, NodeData >::StaticOctree ( )
inlineprotected

Member Function Documentation

template<typename Item , typename NodeData >
void mitsuba::StaticOctree< Item, NodeData >::build ( )
inline
template<typename Item , typename NodeData >
OctreeNode* mitsuba::StaticOctree< Item, NodeData >::build ( const AABB aabb,
uint32_t  depth,
uint32_t base,
uint32_t temp,
uint32_t start,
uint32_t end 
)
inlineprotected
template<typename Item , typename NodeData >
AABB mitsuba::StaticOctree< Item, NodeData >::childBounds ( int  child,
const AABB nodeAABB,
const Point center 
) const
inlineprotected

Return the AABB for a child of the specified index.

Member Data Documentation

template<typename Item , typename NodeData >
AABB mitsuba::StaticOctree< Item, NodeData >::m_aabb
protected
template<typename Item , typename NodeData >
std::vector<Item> mitsuba::StaticOctree< Item, NodeData >::m_items
protected
template<typename Item , typename NodeData >
uint32_t mitsuba::StaticOctree< Item, NodeData >::m_maxDepth
protected
template<typename Item , typename NodeData >
uint32_t mitsuba::StaticOctree< Item, NodeData >::m_maxItems
protected
template<typename Item , typename NodeData >
OctreeNode* mitsuba::StaticOctree< Item, NodeData >::m_root
protected

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