Blender V5.3
btDbvt.cpp File Reference
#include "btDbvt.h"

Go to the source code of this file.

Classes

struct  btDbvtNodeEnumerator

Typedefs

typedef btAlignedObjectArray< btDbvtNode * > tNodeArray
 btDbvt implementation by Nathanael Presson
typedef btAlignedObjectArray< const btDbvtNode * > tConstNodeArray

Functions

static DBVT_INLINE int indexof (const btDbvtNode *node)
static DBVT_INLINE btDbvtVolume merge (const btDbvtVolume &a, const btDbvtVolume &b)
static DBVT_INLINE btScalar size (const btDbvtVolume &a)
static void getmaxdepth (const btDbvtNode *node, int depth, int &maxdepth)
static DBVT_INLINE void deletenode (btDbvt *pdbvt, btDbvtNode *node)
static void recursedeletenode (btDbvt *pdbvt, btDbvtNode *node)
static DBVT_INLINE btDbvtNode * createnode (btDbvt *pdbvt, btDbvtNode *parent, void *data)
static DBVT_INLINE btDbvtNode * createnode (btDbvt *pdbvt, btDbvtNode *parent, const btDbvtVolume &volume, void *data)
static DBVT_INLINE btDbvtNode * createnode (btDbvt *pdbvt, btDbvtNode *parent, const btDbvtVolume &volume0, const btDbvtVolume &volume1, void *data)
static void insertleaf (btDbvt *pdbvt, btDbvtNode *root, btDbvtNode *leaf)
static btDbvtNode * removeleaf (btDbvt *pdbvt, btDbvtNode *leaf)
static void fetchleaves (btDbvt *pdbvt, btDbvtNode *root, tNodeArray &leaves, int depth=-1)
static bool leftOfAxis (const btDbvtNode *node, const btVector3 &org, const btVector3 &axis)
static int split (btDbvtNode **leaves, int count, const btVector3 &org, const btVector3 &axis)
static btDbvtVolume bounds (btDbvtNode **leaves, int count)
static void bottomup (btDbvt *pdbvt, btDbvtNode **leaves, int count)
static btDbvtNode * topdown (btDbvt *pdbvt, btDbvtNode **leaves, int count, int bu_treshold)
static DBVT_INLINE btDbvtNode * sort (btDbvtNode *n, btDbvtNode *&r)

Typedef Documentation

◆ tConstNodeArray

Definition at line 21 of file btDbvt.cpp.

◆ tNodeArray

btDbvt implementation by Nathanael Presson

Definition at line 20 of file btDbvt.cpp.

Function Documentation

◆ bottomup()

void bottomup ( btDbvt * pdbvt,
btDbvtNode ** leaves,
int count )
static

◆ bounds()

◆ createnode() [1/3]

DBVT_INLINE btDbvtNode * createnode ( btDbvt * pdbvt,
btDbvtNode * parent,
const btDbvtVolume & volume,
void * data )
static

Definition at line 115 of file btDbvt.cpp.

References createnode(), DBVT_INLINE, and node.

◆ createnode() [2/3]

DBVT_INLINE btDbvtNode * createnode ( btDbvt * pdbvt,
btDbvtNode * parent,
const btDbvtVolume & volume0,
const btDbvtVolume & volume1,
void * data )
static

Definition at line 126 of file btDbvt.cpp.

References createnode(), DBVT_INLINE, Merge(), and node.

◆ createnode() [3/3]

DBVT_INLINE btDbvtNode * createnode ( btDbvt * pdbvt,
btDbvtNode * parent,
void * data )
static

◆ deletenode()

DBVT_INLINE void deletenode ( btDbvt * pdbvt,
btDbvtNode * node )
static

◆ fetchleaves()

void fetchleaves ( btDbvt * pdbvt,
btDbvtNode * root,
tNodeArray & leaves,
int depth = -1 )
static

◆ getmaxdepth()

void getmaxdepth ( const btDbvtNode * node,
int depth,
int & maxdepth )
static

Definition at line 60 of file btDbvt.cpp.

References btMax(), getmaxdepth(), and node.

Referenced by getmaxdepth(), and btDbvt::maxdepth().

◆ indexof()

DBVT_INLINE int indexof ( const btDbvtNode * node)
static

Definition at line 31 of file btDbvt.cpp.

References DBVT_INLINE, indexof(), and node.

Referenced by indexof(), insertleaf(), removeleaf(), and sort().

◆ insertleaf()

◆ leftOfAxis()

bool leftOfAxis ( const btDbvtNode * node,
const btVector3 & org,
const btVector3 & axis )
static

Definition at line 248 of file btDbvt.cpp.

References btDot(), btVector3, leftOfAxis(), and node.

Referenced by leftOfAxis(), and split().

◆ merge()

DBVT_INLINE btDbvtVolume merge ( const btDbvtVolume & a,
const btDbvtVolume & b )
static

Definition at line 37 of file btDbvt.cpp.

References ATTRIBUTE_ALIGNED16, b, DBVT_INLINE, Merge(), and merge().

◆ recursedeletenode()

void recursedeletenode ( btDbvt * pdbvt,
btDbvtNode * node )
static

Definition at line 80 of file btDbvt.cpp.

References deletenode(), btDbvt::m_root, node, and recursedeletenode().

Referenced by btDbvt::clear(), and recursedeletenode().

◆ removeleaf()

btDbvtNode * removeleaf ( btDbvt * pdbvt,
btDbvtNode * leaf )
static

◆ size()

DBVT_INLINE btScalar size ( const btDbvtVolume & a)
static

Definition at line 52 of file btDbvt.cpp.

References btVector3, DBVT_INLINE, btDbvtAabbMm::Lengths(), and size().

Referenced by ApplyPrimvars(), ATTR_NONNULL(), attribute_alloc_bytes(), bottomup(), bsdf_alloc(), btAlignedAllocDefault(), btAlignedAllocInternal(), btAllocDefault(), btMprSimplexSetSize(), btPoolAlloc(), btSimplexSetSize(), buffer_for_write(), ccl_try_align(), closure_alloc(), closure_alloc_extra(), colorramp_to_array(), computeDeltaVelocityInConstraintSpace(), CreateRegKeyAndSetValue(), cursor_bitmap_rgba_invert(), curvemapping_color_to_array(), curvemapping_float_to_array(), curvemapping_to_array(), data_device_handle_drop(), diffuse_toon(), EIG_svd_square_matrix(), ExportCurveSegmentsMotion(), free_step_buffer(), getCacheEntry(), ghost_wl_buffer_from_cursor_generator(), gim_alloc(), gim_alloca(), glossy_toon(), gmp_alloc(), gwl_window_resize_for_backend(), hair_topology_matches(), iridescence_lookup_sensitivity_channel(), kernel_global_memory_copy(), kernel_osl_use(), keyboard_handle_keymap(), libmv_getFeature(), lookup_table_read(), main(), MEM_guarded_calloc_arrayN(), MEM_guarded_calloc_arrayN_aligned(), MEM_guarded_malloc_arrayN(), MEM_guarded_malloc_arrayN_aligned(), MEM_lockfree_calloc_arrayN(), MEM_lockfree_calloc_arrayN_aligned(), MEM_lockfree_malloc_arrayN(), MEM_lockfree_malloc_arrayN_aligned(), MEM_new_array_uninitialized(), MEM_new_array_zeroed(), memory_usage_block_alloc(), memory_usage_block_free(), mesh_texture_space(), NODE_DEFINE(), NODE_DEFINE(), NODE_DEFINE(), NODE_DEFINE(), node_wireframe(), node_wireframe_screenspace(), osl_allocate_closure_component(), osl_allocate_weighted_closure_component(), pad_pixels(), path_read_compressed_text(), path_read_text(), round_up_to_multiple(), rs_allocate_closure(), serializeRigidBodies(), shade_background_pixels(), size(), string_hex(), string_human_readable_size(), svm_node_wireframe(), sync_attribute_from_blender(), sync_smoke_volume(), sync_volume_object(), tabulated_sobol_generate_4D(), transform_motion_decompose(), TYPED_TEST(), util_aligned_free(), util_aligned_malloc(), util_page_aligned_free(), util_page_aligned_malloc(), wireframe(), xdg_toplevel_handle_configure(), and xdg_toplevel_icon_manager_handle_icon_size().

◆ sort()

◆ split()

int split ( btDbvtNode ** leaves,
int count,
const btVector3 & org,
const btVector3 & axis )
static

Definition at line 258 of file btDbvt.cpp.

References btVector3, leftOfAxis(), and split().

Referenced by split(), and topdown().

◆ topdown()

btDbvtNode * topdown ( btDbvt * pdbvt,
btDbvtNode ** leaves,
int count,
int bu_treshold )
static