Blender V5.0
GIM_BOX_TREE Class Reference

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 ()
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
SIMD_FORCE_INLINE void getNodeBound (GUINT nodeindex, GIM_AABB &bound) const
SIMD_FORCE_INLINE void setNodeBound (GUINT nodeindex, const GIM_AABB &bound)
SIMD_FORCE_INLINE GUINT getLeftNodeIndex (GUINT nodeindex) const
SIMD_FORCE_INLINE GUINT getRightNodeIndex (GUINT nodeindex) const
SIMD_FORCE_INLINE GUINT getScapeNodeIndex (GUINT nodeindex) const

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_NODEm_node_array

Detailed Description

Basic Box tree structure.

Definition at line 107 of file gim_box_set.h.

Constructor & Destructor Documentation

◆ GIM_BOX_TREE()

GIM_BOX_TREE::GIM_BOX_TREE ( )
inline

Definition at line 123 of file gim_box_set.h.

References m_num_nodes.

Member Function Documentation

◆ _build_sub_tree()

void GIM_BOX_TREE::_build_sub_tree ( gim_array< GIM_AABB_DATA > & primitive_boxes,
GUINT startIndex,
GUINT endIndex )
protected

◆ _calc_splitting_axis()

GUINT GIM_BOX_TREE::_calc_splitting_axis ( gim_array< GIM_AABB_DATA > & primitive_boxes,
GUINT startIndex,
GUINT endIndex )
protected

Definition at line 33 of file gim_box_set.cpp.

References btVector3, GUINT, i, and numIndices().

Referenced by _build_sub_tree().

◆ _sort_and_calc_splitting_index()

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 63 of file gim_box_set.cpp.

References btAssert, GUINT, i, numIndices(), and gim_array< T >::swap().

Referenced by _build_sub_tree().

◆ build_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 167 of file gim_box_set.cpp.

References _build_sub_tree(), m_node_array, m_num_nodes, and gim_array< T >::size().

◆ clearNodes()

SIMD_FORCE_INLINE void GIM_BOX_TREE::clearNodes ( )
inline

Definition at line 132 of file gim_box_set.h.

References m_node_array, m_num_nodes, and SIMD_FORCE_INLINE.

◆ getLeftNodeIndex()

SIMD_FORCE_INLINE GUINT GIM_BOX_TREE::getLeftNodeIndex ( GUINT nodeindex) const
inline

Definition at line 165 of file gim_box_set.h.

References GUINT, m_node_array, and SIMD_FORCE_INLINE.

◆ getNodeBound()

SIMD_FORCE_INLINE void GIM_BOX_TREE::getNodeBound ( GUINT nodeindex,
GIM_AABB & bound ) const
inline

Definition at line 155 of file gim_box_set.h.

References GUINT, m_node_array, and SIMD_FORCE_INLINE.

◆ getNodeCount()

SIMD_FORCE_INLINE GUINT GIM_BOX_TREE::getNodeCount ( ) const
inline

node count

Definition at line 139 of file gim_box_set.h.

References GUINT, m_num_nodes, and SIMD_FORCE_INLINE.

◆ getNodeData()

SIMD_FORCE_INLINE GUINT GIM_BOX_TREE::getNodeData ( GUINT nodeindex) const
inline

Definition at line 150 of file gim_box_set.h.

References GUINT, m_node_array, and SIMD_FORCE_INLINE.

◆ getRightNodeIndex()

SIMD_FORCE_INLINE GUINT GIM_BOX_TREE::getRightNodeIndex ( GUINT nodeindex) const
inline

Definition at line 170 of file gim_box_set.h.

References GUINT, m_node_array, and SIMD_FORCE_INLINE.

◆ getScapeNodeIndex()

SIMD_FORCE_INLINE GUINT GIM_BOX_TREE::getScapeNodeIndex ( GUINT nodeindex) const
inline

Definition at line 175 of file gim_box_set.h.

References GUINT, m_node_array, and SIMD_FORCE_INLINE.

◆ isLeafNode()

SIMD_FORCE_INLINE bool GIM_BOX_TREE::isLeafNode ( GUINT nodeindex) const
inline

tells if the node is a leaf

Definition at line 145 of file gim_box_set.h.

References GUINT, m_node_array, and SIMD_FORCE_INLINE.

◆ setNodeBound()

SIMD_FORCE_INLINE void GIM_BOX_TREE::setNodeBound ( GUINT nodeindex,
const GIM_AABB & bound )
inline

Definition at line 160 of file gim_box_set.h.

References GUINT, m_node_array, and SIMD_FORCE_INLINE.

Member Data Documentation

◆ m_node_array

◆ m_num_nodes

GUINT GIM_BOX_TREE::m_num_nodes
protected

Definition at line 110 of file gim_box_set.h.

Referenced by _build_sub_tree(), build_tree(), clearNodes(), getNodeCount(), and GIM_BOX_TREE().


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