#include <ray_kdtree.h>

Public Member Functions | |
| void | createLeaf (u_int32 *primIdx, int np, const T **prims, MemoryArena &arena) |
| void | createInterior (int axis, PFLOAT d) |
| PFLOAT | SplitPos () const |
| int | SplitAxis () const |
| int | nPrimitives () const |
| bool | IsLeaf () const |
| u_int32 | getRightChild () const |
| void | setRightChild (u_int32 i) |
Public Attributes | |
| union { | |
| PFLOAT division | |
| interior: division plane position | |
| T ** primitives | |
| leaf: list of primitives | |
| T * onePrimitive | |
| leaf: direct inxex of one primitive | |
| }; | |
| u_int32 | flags |
| 2bits: isLeaf, axis; 30bits: nprims (leaf) or index of right child | |
kd-tree nodes, kept as small as possible double precision float and/or 64 bit system: 12bytes else 8 bytes
Definition at line 27 of file ray_kdtree.h.
| void rkdTreeNode< T >::createInterior | ( | int | axis, | |
| PFLOAT | d | |||
| ) | [inline] |
Definition at line 49 of file ray_kdtree.h.
| void rkdTreeNode< T >::createLeaf | ( | u_int32 * | primIdx, | |
| int | np, | |||
| const T ** | prims, | |||
| MemoryArena & | arena | |||
| ) | [inline] |
Definition at line 30 of file ray_kdtree.h.
| u_int32 rkdTreeNode< T >::getRightChild | ( | ) | const [inline] |
Definition at line 55 of file ray_kdtree.h.
| bool rkdTreeNode< T >::IsLeaf | ( | ) | const [inline] |
Definition at line 54 of file ray_kdtree.h.
| int rkdTreeNode< T >::nPrimitives | ( | ) | const [inline] |
Definition at line 53 of file ray_kdtree.h.
| void rkdTreeNode< T >::setRightChild | ( | u_int32 | i | ) | [inline] |
Definition at line 56 of file ray_kdtree.h.
| int rkdTreeNode< T >::SplitAxis | ( | ) | const [inline] |
Definition at line 52 of file ray_kdtree.h.
| PFLOAT rkdTreeNode< T >::SplitPos | ( | ) | const [inline] |
Definition at line 51 of file ray_kdtree.h.
| union { ... } |
| PFLOAT rkdTreeNode< T >::division |
interior: division plane position
Definition at line 60 of file ray_kdtree.h.
| u_int32 rkdTreeNode< T >::flags |
2bits: isLeaf, axis; 30bits: nprims (leaf) or index of right child
Definition at line 64 of file ray_kdtree.h.
| T* rkdTreeNode< T >::onePrimitive |
leaf: direct inxex of one primitive
Definition at line 62 of file ray_kdtree.h.
| T** rkdTreeNode< T >::primitives |
leaf: list of primitives
Definition at line 61 of file ray_kdtree.h.
1.6.1