MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / insert

Method insert

core/math/dynamic_bvh.cpp:337–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335}
336
337DynamicBVH::ID DynamicBVH::insert(const AABB &p_box, void *p_userdata) {
338 Volume volume;
339 volume.min = p_box.position;
340 volume.max = p_box.position + p_box.size;
341
342 Node *leaf = _create_node_with_volume(nullptr, volume, p_userdata);
343 _insert_leaf(bvh_root, leaf);
344 ++total_leaves;
345
346 ID id;
347 id.node = leaf;
348
349 return id;
350}
351
352void DynamicBVH::_update(Node *leaf, int lookahead) {
353 Node *root = _remove_leaf(leaf);

Callers 5

connect_pointsMethod · 0.45
disconnect_pointsMethod · 0.45
buildMethod · 0.45
convex_hullMethod · 0.45
tetrahedralizeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected