Blender V2.61 - r43446
|
Basic Box tree structure. More...
#include <gim_box_set.h>
Public Member Functions | |
GIM_BOX_TREE () | |
void | build_tree (gim_array< GIM_AABB_DATA > &primitive_boxes) |
stackless build tree | |
SIMD_FORCE_INLINE void | clearNodes () |
stackless build tree | |
SIMD_FORCE_INLINE GUINT | getNodeCount () const |
node count | |
SIMD_FORCE_INLINE bool | isLeafNode (GUINT nodeindex) const |
tells if the node is a leaf | |
SIMD_FORCE_INLINE GUINT | getNodeData (GUINT nodeindex) const |
stackless build tree | |
SIMD_FORCE_INLINE void | getNodeBound (GUINT nodeindex, GIM_AABB &bound) const |
stackless build tree | |
SIMD_FORCE_INLINE void | setNodeBound (GUINT nodeindex, const GIM_AABB &bound) |
stackless build tree | |
SIMD_FORCE_INLINE GUINT | getLeftNodeIndex (GUINT nodeindex) const |
stackless build tree | |
SIMD_FORCE_INLINE GUINT | getRightNodeIndex (GUINT nodeindex) const |
stackless build tree | |
SIMD_FORCE_INLINE GUINT | getScapeNodeIndex (GUINT nodeindex) const |
stackless build tree | |
Protected Member Functions | |
GUINT | _sort_and_calc_splitting_index (gim_array< GIM_AABB_DATA > &primitive_boxes, GUINT startIndex, GUINT endIndex, GUINT splitAxis) |
GUINT | _calc_splitting_axis (gim_array< GIM_AABB_DATA > &primitive_boxes, GUINT startIndex, GUINT endIndex) |
void | _build_sub_tree (gim_array< GIM_AABB_DATA > &primitive_boxes, GUINT startIndex, GUINT endIndex) |
Protected Attributes | |
GUINT | m_num_nodes |
gim_array< GIM_BOX_TREE_NODE > | m_node_array |
Basic Box tree structure.
Definition at line 133 of file gim_box_set.h.
GIM_BOX_TREE::GIM_BOX_TREE | ( | ) | [inline] |
Definition at line 147 of file gim_box_set.h.
References m_num_nodes.
void GIM_BOX_TREE::_build_sub_tree | ( | gim_array< GIM_AABB_DATA > & | primitive_boxes, |
GUINT | startIndex, | ||
GUINT | endIndex | ||
) | [protected] |
Definition at line 119 of file gim_box_set.cpp.
References _calc_splitting_axis(), _sort_and_calc_splitting_index(), btAssert, GUINT, gim_array< T >::m_data, m_node_array, and m_num_nodes.
Referenced by build_tree().
GUINT GIM_BOX_TREE::_calc_splitting_axis | ( | gim_array< GIM_AABB_DATA > & | primitive_boxes, |
GUINT | startIndex, | ||
GUINT | endIndex | ||
) | [protected] |
Definition at line 35 of file gim_box_set.cpp.
Referenced by _build_sub_tree().
GUINT GIM_BOX_TREE::_sort_and_calc_splitting_index | ( | gim_array< GIM_AABB_DATA > & | primitive_boxes, |
GUINT | startIndex, | ||
GUINT | endIndex, | ||
GUINT | splitAxis | ||
) | [protected] |
Definition at line 66 of file gim_box_set.cpp.
References btAssert, GUINT, i, and gim_array< T >::swap().
Referenced by _build_sub_tree().
void GIM_BOX_TREE::build_tree | ( | gim_array< GIM_AABB_DATA > & | primitive_boxes | ) |
stackless build tree
prototype functions for box tree management
Definition at line 171 of file gim_box_set.cpp.
References _build_sub_tree(), m_node_array, m_num_nodes, gim_array< T >::resize(), and gim_array< T >::size().
SIMD_FORCE_INLINE void GIM_BOX_TREE::clearNodes | ( | ) | [inline] |
stackless build tree
prototype functions for box tree management
Definition at line 156 of file gim_box_set.h.
References gim_array< T >::clear(), m_node_array, and m_num_nodes.
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE::getLeftNodeIndex | ( | GUINT | nodeindex | ) | const [inline] |
stackless build tree
prototype functions for box tree management
Definition at line 189 of file gim_box_set.h.
References m_node_array.
SIMD_FORCE_INLINE void GIM_BOX_TREE::getNodeBound | ( | GUINT | nodeindex, |
GIM_AABB & | bound | ||
) | const [inline] |
stackless build tree
prototype functions for box tree management
Definition at line 179 of file gim_box_set.h.
References m_node_array.
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE::getNodeCount | ( | ) | const [inline] |
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE::getNodeData | ( | GUINT | nodeindex | ) | const [inline] |
stackless build tree
prototype functions for box tree management
Definition at line 174 of file gim_box_set.h.
References gim_array< T >::m_data, and m_node_array.
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE::getRightNodeIndex | ( | GUINT | nodeindex | ) | const [inline] |
stackless build tree
prototype functions for box tree management
Definition at line 194 of file gim_box_set.h.
References m_node_array.
SIMD_FORCE_INLINE GUINT GIM_BOX_TREE::getScapeNodeIndex | ( | GUINT | nodeindex | ) | const [inline] |
stackless build tree
prototype functions for box tree management
Definition at line 199 of file gim_box_set.h.
References m_node_array.
SIMD_FORCE_INLINE bool GIM_BOX_TREE::isLeafNode | ( | GUINT | nodeindex | ) | const [inline] |
SIMD_FORCE_INLINE void GIM_BOX_TREE::setNodeBound | ( | GUINT | nodeindex, |
const GIM_AABB & | bound | ||
) | [inline] |
stackless build tree
prototype functions for box tree management
Definition at line 184 of file gim_box_set.h.
References m_node_array.
gim_array<GIM_BOX_TREE_NODE> GIM_BOX_TREE::m_node_array [protected] |
Definition at line 137 of file gim_box_set.h.
Referenced by _build_sub_tree(), build_tree(), clearNodes(), getLeftNodeIndex(), getNodeBound(), getNodeData(), getRightNodeIndex(), getScapeNodeIndex(), isLeafNode(), and setNodeBound().
GUINT GIM_BOX_TREE::m_num_nodes [protected] |
Definition at line 136 of file gim_box_set.h.
Referenced by _build_sub_tree(), build_tree(), clearNodes(), getNodeCount(), and GIM_BOX_TREE().