Blender V2.61 - r43446
|
#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 void | split (const tNodeArray &leaves, tNodeArray &left, tNodeArray &right, const btVector3 &org, const btVector3 &axis) |
static btDbvtVolume | bounds (const tNodeArray &leaves) |
static void | bottomup (btDbvt *pdbvt, tNodeArray &leaves) |
static btDbvtNode * | topdown (btDbvt *pdbvt, tNodeArray &leaves, int bu_treshold) |
static DBVT_INLINE btDbvtNode * | sort (btDbvtNode *n, btDbvtNode *&r) |
typedef btAlignedObjectArray<const btDbvtNode*> tConstNodeArray |
Definition at line 21 of file btDbvt.cpp.
typedef btAlignedObjectArray<btDbvtNode*> tNodeArray |
btDbvt implementation by Nathanael Presson
Definition at line 20 of file btDbvt.cpp.
static void bottomup | ( | btDbvt * | pdbvt, |
tNodeArray & | leaves | ||
) | [static] |
Definition at line 266 of file btDbvt.cpp.
References btDbvtNode::childs, createnode(), i, merge(), p, btDbvtNode::parent, btAlignedObjectArray< T >::pop_back(), SIMD_INFINITY, btAlignedObjectArray< T >::size(), size(), and btAlignedObjectArray< T >::swap().
Referenced by btDbvt::optimizeBottomUp(), and topdown().
static btDbvtVolume bounds | ( | const tNodeArray & | leaves | ) | [static] |
Definition at line 249 of file btDbvt.cpp.
References ATTRIBUTE_ALIGNED16, i, Merge(), and btAlignedObjectArray< T >::size().
Referenced by btDbvtBroadphase::aabbTest(), BVHBuild::create_leaf_node(), BVHBuild::create_object_leaf_nodes(), BVHBuild::do_spatial_split(), extrawindow_do_reshape(), BVHBuild::find_object_split(), BVHBuild::find_spatial_split(), btDbvtBroadphase::getBroadphaseAabb(), btSphereBoxCollisionAlgorithm::getSphereDistance(), btSphereBoxCollisionAlgorithm::getSpherePenetration(), GHOST_SystemCocoa::handleMouseEvent(), InnerNode::InnerNode(), LeafNode::LeafNode(), loggerwindow_do_reshape(), mainwindow_do_reshape(), btCompoundCollisionAlgorithm::processCollision(), GHOST_SystemWin32::processCursorEvent(), btDbvt::rayTest(), btDbvt::rayTestInternal(), GHOST_Window::setCursorGrab(), topdown(), btSoftBody::updateClusters(), wm_macro_modal(), wm_operator_invoke(), wm_window_get_size_ghost(), zbuffer_abuf(), zbuffer_solid(), zbuffer_sss(), and zbuffer_strands_abuf().
static DBVT_INLINE btDbvtNode* createnode | ( | btDbvt * | pdbvt, |
btDbvtNode * | parent, | ||
const btDbvtVolume & | volume, | ||
void * | data | ||
) | [static] |
Definition at line 106 of file btDbvt.cpp.
References createnode(), and btDbvtNode::volume.
static DBVT_INLINE btDbvtNode* createnode | ( | btDbvt * | pdbvt, |
btDbvtNode * | parent, | ||
const btDbvtVolume & | volume0, | ||
const btDbvtVolume & | volume1, | ||
void * | data | ||
) | [static] |
Definition at line 117 of file btDbvt.cpp.
References createnode(), Merge(), and btDbvtNode::volume.
static DBVT_INLINE btDbvtNode* createnode | ( | btDbvt * | pdbvt, |
btDbvtNode * | parent, | ||
void * | data | ||
) | [static] |
Definition at line 90 of file btDbvt.cpp.
References btAlignedAlloc, btDbvtNode::childs, data, btDbvtNode::data, btDbvt::m_free, and btDbvtNode::parent.
Referenced by bottomup(), btDbvt::clone(), createnode(), btDbvt::insert(), insertleaf(), and topdown().
static DBVT_INLINE void deletenode | ( | btDbvt * | pdbvt, |
btDbvtNode * | node | ||
) | [static] |
Definition at line 69 of file btDbvt.cpp.
References btAlignedFree, and btDbvt::m_free.
Referenced by fetchleaves(), recursedeletenode(), btDbvt::remove(), and removeleaf().
static void fetchleaves | ( | btDbvt * | pdbvt, |
btDbvtNode * | root, | ||
tNodeArray & | leaves, | ||
int | depth = -1 |
||
) | [static] |
Definition at line 213 of file btDbvt.cpp.
References btDbvtNode::childs, deletenode(), btDbvtNode::isinternal(), and btAlignedObjectArray< T >::push_back().
Referenced by btDbvt::optimizeBottomUp(), and btDbvt::optimizeTopDown().
static void getmaxdepth | ( | const btDbvtNode * | node, |
int | depth, | ||
int & | maxdepth | ||
) | [static] |
Definition at line 59 of file btDbvt.cpp.
References btMax(), btDbvtNode::childs, and btDbvtNode::isinternal().
Referenced by btDbvt::maxdepth().
static DBVT_INLINE int indexof | ( | const btDbvtNode * | node | ) | [static] |
Definition at line 31 of file btDbvt.cpp.
References btDbvtNode::childs, and btDbvtNode::parent.
Referenced by insertleaf(), removeleaf(), and sort().
static void insertleaf | ( | btDbvt * | pdbvt, |
btDbvtNode * | root, | ||
btDbvtNode * | leaf | ||
) | [static] |
Definition at line 129 of file btDbvt.cpp.
References btDbvtNode::childs, btDbvtAabbMm::Contain(), createnode(), indexof(), btDbvtNode::isleaf(), btDbvt::m_root, Merge(), btDbvtNode::parent, MakeCursor::root, Select(), and btDbvtNode::volume.
Referenced by btDbvt::insert(), and btDbvt::update().
static DBVT_INLINE btDbvtVolume merge | ( | const btDbvtVolume & | a, |
const btDbvtVolume & | b | ||
) | [static] |
Definition at line 37 of file btDbvt.cpp.
References ATTRIBUTE_ALIGNED16, and Merge().
Referenced by arrayModifier_doArray(), bottomup(), and calc_mapping().
static void recursedeletenode | ( | btDbvt * | pdbvt, |
btDbvtNode * | node | ||
) | [static] |
Definition at line 77 of file btDbvt.cpp.
References btDbvtNode::childs, deletenode(), btDbvtNode::isleaf(), and btDbvt::m_root.
Referenced by btDbvt::clear().
static btDbvtNode* removeleaf | ( | btDbvt * | pdbvt, |
btDbvtNode * | leaf | ||
) | [static] |
Definition at line 173 of file btDbvt.cpp.
References btDbvtNode::childs, deletenode(), indexof(), btDbvt::m_root, Merge(), NotEqual(), btDbvtNode::parent, and btDbvtNode::volume.
Referenced by btDbvt::remove(), and btDbvt::update().
static DBVT_INLINE btScalar size | ( | const btDbvtVolume & | a | ) | [static] |
Definition at line 51 of file btDbvt.cpp.
References btDbvtAabbMm::Lengths().
Referenced by BuildBinaryVBVH< Node >::_transform(), add_memfilechunk(), add_vn_vn(), add_vn_vnvn(), addzbuffloatImBuf(), addzbufImBuf(), LbmFsgrSolver::advanceParticles(), MemArena::alloc(), applyModifier(), KX_BlenderRenderTools::applyTransform(), GPC_RenderTools::applyTransform(), AUD_Buffer::AUD_Buffer(), AUD_FFMPEGFactory::AUD_FFMPEGFactory(), AUD_FileFactory::AUD_FileFactory(), AUD_SndFileFactory::AUD_SndFileFactory(), AUD_StreamBufferFactory::AUD_StreamBufferFactory(), avi_converter_to_mjpeg(), AVI_open_movie(), AVI_write_frame(), BGL_MakeBuffer(), biggest_non_image_area(), BKE_font_register_builtin(), BKE_image_print_memlist(), BKE_screen_find_big_area(), BLF_blur(), blf_font_size(), bli_adddirstrings(), BLI_file_read_as_lines(), BLI_file_size(), BLI_file_ungzip_to_mem(), BLI_gsqueue_size(), BLI_heap_down(), BLI_memarena_alloc(), BLI_thread_queue_size(), BoneSize(), BOP_createXS(), BOP_getPoints(), BOP_mergeSort(), bottomup(), BPy_BoolVectorProperty(), BPy_FloatVectorProperty(), BPy_IDArray_ass_slice(), BPy_IntVectorProperty(), bpy_lib_exit(), brush_add(), brush_debug_print_state(), brush_drawcursor(), brush_painter_refresh_cache(), brush_painter_require_imbuf(), brush_scale_size_exec(), brush_set_size(), Buffer_item(), build_Rd_table(), C_Vector_Fill(), C_Vector_Linspace(), C_Vector_Range(), C_Vector_Repeat(), VBVH_optimalPackSIMD< Node, TestCost >::calc_best::calc_best(), calc_edge_stress(), ImageBase::calcSize(), channelSimplifyScalarT(), channelSimplifyVecT(), ParticleTracer::checkDumpTextPositions(), childof_evaluate(), cineonOpenFromMem(), clampto_evaluate(), ImageBuff::clear(), clipx_rctf(), clipy_rctf(), Color_ass_slice(), colorband_table_RGBA(), complete_partial_load(), compress_deepshadowbuf(), compress_shadowbuf(), LOD_MeshBounds::ComputeBounds(), copy_to_ztile(), btStackAlloc::create(), create_mesh(), curvemap_buttons_layout(), curvemapping_table_RGBA(), customData_add_layer__internal(), TransformReader::dae_scale_to_mat4(), decodetarga(), def_internal_icon(), MeshManager::device_update_attributes(), IsoSurface::diffuseVertexField(), distribute_grid(), dna_write(), do_colorband_blend(), do_ob_key(), dot_vn_vn(), draw_dm_verts__mapFunc(), draw_em_fancy_verts(), draw_empty_cone(), draw_forcefield(), draw_manipulator_rotate(), draw_manipulator_rotate_cyl(), draw_manipulator_scale(), draw_manipulator_translate(), draw_volume(), drawArrow(), drawArrowHead(), drawaxes(), drawcentercircle(), drawSnapping(), KX_FontObject::DrawText(), dumptarga(), KDL::EatWord(), elbeemSimplifyChannelFloat(), elbeemSimplifyChannelVec3(), EM_fgon_flags(), emDM_getFaceDataArray(), Euler_ass_slice(), EXPP_VectorsAreEqual(), face_duplilist(), fill_vn_fl(), fill_vn_i(), findFileRecursive(), GHOST_DisplayManager::findMatch(), followpath_evaluate(), foreach_getset(), KX_BlenderSceneConverter::FreeBlendFile(), get_alpha_clone_image(), get_item_size(), get_proxy_fname(), GHOST_DisplayManager::getDisplaySetting(), ParticleObject::getMass(), GPU_buffer_alloc(), GPU_interleaved_attrib_setup(), gpu_shader_curve_rgb(), gpu_shader_curve_vec(), gpu_shader_valtorgb(), GPU_texture(), harmonic_coordinates_bind(), icon_create_rect(), image_aspect(), image_mem_size(), image_view_selected_exec(), ImageViewport_setCaptureSize(), imb_addrectfloatImBuf(), imb_addrectImBuf(), IMB_convert_rgba_to_abgr(), IMB_get_size_in_memory(), imb_loadhdr(), IMB_loadifffile(), imb_loadpng(), imb_loadtarga(), imb_loadtilefile(), imb_tiff_client_open(), init_meta(), init_metaball_octal_tree(), initialize_chain(), initialize_posetree(), initlocalview(), KDL::IOTracePopStr(), isb_bsp_fillfaces(), keyIndex_updateCV(), kill_selection(), lamp_get_visibility(), layerCopy_mdeformvert(), layerFilesize_mdisps(), layerFree_mdeformvert(), ldtarga(), load_frame_blendervoxel(), load_frame_raw8(), load_tex(), loadblend_thumb(), logimage_fread(), M_Geometry_tesselate_polygon(), M_Noise_random_unit_vector(), make_orco_mball(), mathutils_array_parse(), mathutils_array_parse_alloc(), mathutils_array_parse_fast(), Matrix_ass_slice(), Matrix_decompose(), Matrix_str(), Matrix_to_scale(), CUDADevice::mem_copy_from(), meshdeform_bind_floodfill(), meshdeform_dynamic_bind(), meshdeform_index(), Mirror(), mouse_on_corner(), movieclip_build_proxy_ibuf(), ms_diffuse(), mul_vn_fl(), mul_vn_vn_fl(), multiple_scattering_diffusion(), my_tex_space_mesh(), negate_vn(), negate_vn_vn(), new_mem_element(), new_particle_duplilist(), new_pgn_element(), NG_LoopBackNetworkDeviceInterface::NextFrame(), ParticleTracer::notifyOfDump(), object_tfm_protected_backup(), orthogonalize_m3(), orthogonalize_m4(), paste_selection(), path_read_text(), permutate(), phash_insert(), project_paint_end(), project_paint_uvpixel_init(), psys_get_child_size(), psys_render_simplify_distribution(), ptcache_file_compressed_read(), py_blf_size(), Quaternion_ass_slice(), rand_vn(), range_vn_fl(), range_vn_i(), rct_fits(), RE_rayobject_octree_create(), RE_rayobject_vbvh_create(), RE_strandren_get_mcol(), RE_strandren_get_uv(), RE_vlakren_get_mcol(), RE_vlakren_get_tface(), CacheData::read(), AUD_SRCResampleReader::read(), AUD_LinearResampleReader::read(), AUD_FFMPEGReader::read_packet(), ReadData(), readPackedFile(), region_scale_validate_size(), register_closure(), regular_light_sample(), KX_BlenderSceneConverter::RemoveScene(), Resize(), HalfArray< T >::resize(), AUD_Buffer::resize(), RNA_parameter_list_create(), rna_parameter_size_alloc(), rna_raw_access(), rna_sortlist(), rotlike_evaluate(), rotlimit_evaluate(), rtbuild_create(), rtbuild_heuristic_object_split(), scatter_tree_build(), btDiscreteDynamicsWorld::serializeRigidBodies(), set_alpha(), BL_Shader::SetUniformfv(), BL_Shader::SetUniformiv(), setup_other_props(), shadowbuf_project_co(), sizelike_evaluate(), sizelimit_evaluate(), sk_getStrokeSnapPoint(), sk_insertStrokePoint(), sk_insertStrokePoints(), sk_polygonizeStroke(), sk_trimStroke(), smoke_dissolve(), smoke_dissolve_wavelet(), smoke_step(), sphere_light_sample(), SVMCompiler::stack_clear_temporary(), SVMCompiler::stack_clear_users(), SVMCompiler::stack_find_offset(), SVMCompiler::stack_link(), stretchto_evaluate(), sub_vn_vn(), sub_vn_vnvn(), tekenvertsN(), testBGLBuffer(), testPyBuffer(), CUDADevice::tex_alloc(), tex_space_mesh(), text_update_drawcache(), texture_procedural(), Texture_refresh(), Toon_Diff(), Toon_Spec(), trackto_evaluate(), transform_evaluate(), transform_mesh_orco_verts(), translate_id(), ui_draw_but_NORMAL(), ui_numedit_but_SLI(), uiBlockLayout(), undo_paint_push_count_alloc(), MeshManager::update_svm_attributes(), Vector_angle(), Vector_ass_slice(), Vector_CreatePyObject(), Vector_lerp(), Vector_new(), Vector_normalize(), Vector_project(), Vector_resize(), Vector_resized(), vectorscope_put_cross(), view3d_all_exec(), view3d_center_camera_exec(), view3d_sample_backbuf_rect(), view3d_set_1_to_1_viewborder(), view_borderzoom_exec(), viewselected_exec(), SG_BBox::volume(), widget_check_trias(), widget_draw_preview(), widget_menu_trias(), widget_scroll(), write_modifiers(), zbuf_project_cache_clear(), and zbuffer_abuf_shadow().
static DBVT_INLINE btDbvtNode* sort | ( | btDbvtNode * | n, |
btDbvtNode *& | r | ||
) | [static] |
Definition at line 369 of file btDbvt.cpp.
References btAssert, btSwap(), btDbvtNode::childs, i, indexof(), btDbvtNode::isinternal(), p, btDbvtNode::parent, and btDbvtNode::volume.
Referenced by AnimationImporter::apply_matrix_curves(), bvh_reference_sort(), MeanValueMeshCoords::computeWeights(), esubdivideflag(), SubdFaceRing::evaluate_stencils(), AnimationExporter::find_frames(), object_sort(), btDbvt::optimizeIncremental(), RAS_MeshObject::SortPolygons(), and AnimationImporter::translate_animation_OLD().
static void split | ( | const tNodeArray & | leaves, |
tNodeArray & | left, | ||
tNodeArray & | right, | ||
const btVector3 & | org, | ||
const btVector3 & | axis | ||
) | [static] |
Definition at line 231 of file btDbvt.cpp.
References btDot(), i, btAlignedObjectArray< T >::push_back(), btAlignedObjectArray< T >::resize(), and btAlignedObjectArray< T >::size().
Referenced by area_split(), curvemap_buttons_layout(), draw_actuator_constraint(), draw_actuator_edit_object(), draw_actuator_filter_2d(), draw_actuator_motion(), draw_actuator_state(), draw_controller_python(), draw_modifier__cycles(), draw_modifier__limits(), draw_modifier__noise(), draw_sensor_collision(), draw_sensor_internal_header(), draw_sensor_ray(), BVHBuild::find_object_split(), BVHBuild::find_spatial_split(), gp_drawui_layer(), list_item_row(), logic_buttons_new(), node_composit_buts_colorbalance(), node_sockets_panel(), p_node_new(), string_split(), topdown(), ui_block_func_MENUSTR(), ui_litem_layout_split(), ui_node_draw_input(), ui_node_draw_node(), ui_template_node_link_menu(), uiDefAutoButsRNA(), uiItemsEnumR(), uiItemsFullEnumO(), uiLayoutSplit(), uiTemplateImage(), uiTemplateImageSettings(), uiTemplateMovieClip(), undo_history_invoke(), v3d_transform_butsR(), and wm_block_create_splash().
static btDbvtNode* topdown | ( | btDbvt * | pdbvt, |
tNodeArray & | leaves, | ||
int | bu_treshold | ||
) | [static] |
Definition at line 299 of file btDbvt.cpp.
References bottomup(), bounds(), btDot(), btFabs(), btDbvtAabbMm::Center(), btDbvtNode::childs, createnode(), i, btDbvtNode::parent, btAlignedObjectArray< T >::push_back(), btAlignedObjectArray< T >::reserve(), btAlignedObjectArray< T >::size(), and split().
Referenced by btDbvt::optimizeTopDown().