virtualx-engine/core
lawnjelly 667c970b77 Optimize octree and fix octree leak
Prevents adding new octants until a limiting number of elements have been added to the current octant. This enables balancing the benefits of brute force against the benefits of spatial partitioning. The limit can be set per octree.

Project settings are added for rendering octree to set the best balance per project depending on number of tests per frame / tick, and the amount of editing of the octree.

Fixes octants being leaked when removing elements.

Optimize octree with cached linear lists

Storing elements in octants using linked lists is efficient for housekeeping but very slow for testing. This optimization stores additional local_vectors with Element pointers and AABBs which are cached and only updated when a dirty flag is set on the octant.

This is selectable with 2 versions of Octree : Octree and Octree_CL, Octree being the old behaviour. At present the cached list version is only used for the visual server octree (rendering) as it has only been demonstrated to be faster there so far.

This uses slightly more memory (probably a few kb in most cases) but can be significantly faster during testing (culling etc).

Co-authored-by: Sergey Minakov <naithar@icloud.com>
2020-08-18 11:02:21 +01:00
..
bind Revert "Fix Directory Open Check" 2020-07-28 13:54:13 -04:00
crypto SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
io issue-40396 - Added missing error strings to JSON parsing when array or object is never closed. 2020-07-24 10:31:57 +02:00
math Optimize octree and fix octree leak 2020-08-18 11:02:21 +01:00
os Fix Return key events in LineEdit & TextEdit on Android 2020-07-17 18:25:40 +02:00
array.cpp Fix array slicing. 2020-05-06 23:28:44 +02:00
array.h Fix array slicing. 2020-05-06 23:28:44 +02:00
class_db.cpp ClassDB: Exclude method binds starting with '_' from API hash 2020-01-07 00:08:49 +01:00
class_db.h Merge pull request #34726 from nekomatata/polygon2d-antialiasing-fix 2020-01-03 14:17:05 +01:00
color.cpp Color: Fix deprecation warning mentioning 'get_v()' instead of 'v' 2020-01-28 12:41:04 +01:00
color.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
color_names.inc doc: Document named color constants 2020-01-26 12:08:16 +01:00
command_queue_mt.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
command_queue_mt.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
compressed_translation.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
compressed_translation.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
core_builders.py Update AUTHORS and DONORS list 2020-08-14 00:32:05 +02:00
core_string_names.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
core_string_names.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
cowdata.h Ensure COWData does not reallocate on push back, fixes #22561 2020-04-16 11:46:00 +02:00
dictionary.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
dictionary.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
engine.cpp Update AUTHORS and DONORS list 2020-08-14 00:32:05 +02:00
engine.h Fix Engine get_target_fps() returning float instead of int. 2020-04-16 12:47:19 +02:00
error_list.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
error_macros.cpp Improve and document error macros 2020-01-24 17:19:57 +01:00
error_macros.h Optimize octree and fix octree leak 2020-08-18 11:02:21 +01:00
func_ref.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
func_ref.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
global_constants.cpp Support SDL2 half axes and inverted axes mappings. 2020-06-26 06:28:56 +01:00
global_constants.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
hash_map.h Call CRASH_COND_MSG if key not found in HashMap get function. 2020-07-03 13:17:57 +02:00
hashfuncs.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
image.cpp Image: Improve error messages for invalid creation size 2020-07-03 15:34:30 +02:00
image.h Expose loading TGA images in Image. 2020-07-03 13:17:57 +02:00
input_map.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
input_map.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
int_types.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
list.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
local_vector.h Optimize octree and fix octree leak 2020-08-18 11:02:21 +01:00
make_binders.py SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
map.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
message_queue.cpp Tweak the message queue maximum size property hint 2020-03-25 11:38:53 +01:00
message_queue.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
method_bind.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
method_bind.h Allows to doc vararg method return type as void 2020-01-02 21:37:26 +08:00
method_ptrcall.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
node_path.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
node_path.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
oa_hash_map.h Removed const from OAHashMap iterator value 2020-05-20 11:35:28 +02:00
object.cpp Show errors on Object.call_deferred 2020-07-28 00:40:07 +02:00
object.h Fix dangling and reassigned Variants 2020-04-23 13:51:02 +02:00
object_id.h Style: Sync other changes from new fix_style.sh and clang_format.sh 2020-07-24 10:39:18 +02:00
object_rc.h Fix GDNative compat breakage due to dangling Variants fix 2020-04-27 13:07:52 +02:00
ordered_hash_map.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
packed_data_container.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
packed_data_container.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
pair.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
path_remap.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
path_remap.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
pool_allocator.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
pool_allocator.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
pool_vector.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
pool_vector.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
print_string.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
print_string.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
project_settings.cpp Fix overriding compression related settings 2020-07-13 15:15:40 +02:00
project_settings.h Revert "Made possible to specify where to dump the contents when loading a ".pck" file" 2020-04-20 13:48:02 +02:00
ref_ptr.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
ref_ptr.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
reference.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
reference.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
register_core_types.cpp New PacketPeerDTLS and DTLSServer classes. 2020-02-25 11:35:47 +01:00
register_core_types.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
resource.cpp Core: Add hints to run with --verbose when leaking nodes/resources at exit 2020-06-10 15:30:52 +02:00
resource.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
rid.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
rid.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
ring_buffer.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
safe_refcount.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
safe_refcount.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
script_debugger_local.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
script_debugger_local.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
script_language.cpp Remap script path when registering class. 2020-08-14 00:32:04 +02:00
script_language.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
SCsub SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
self_list.h Fix object leaks caused by unfulfilled yields 2020-05-05 17:53:47 +02:00
set.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
simple_type.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
sort_array.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
string_buffer.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
string_builder.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
string_builder.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
string_name.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
string_name.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
translation.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
translation.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
type_info.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
typedefs.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
ucaps.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
undo_redo.cpp Allows to doc vararg method return type as void 2020-01-02 21:37:26 +08:00
undo_redo.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
ustring.cpp Add missing NULL termination to the String::repeat function. 2020-08-11 17:23:44 +03:00
ustring.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
variant.cpp Fix leaked ObjectRCs on object Variant reassignment 2020-06-28 01:31:00 +02:00
variant.h Fix GDNative compat breakage due to dangling Variants fix 2020-04-27 13:07:52 +02:00
variant_call.cpp [3.2] Backport core documentation changes to 3.2 2020-07-21 21:22:54 -04:00
variant_op.cpp Fix GDNative compat breakage due to dangling Variants fix 2020-04-27 13:07:52 +02:00
variant_parser.cpp VariantParser: Fix crash on malformed vectors 2020-06-10 15:30:52 +02:00
variant_parser.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
vector.h Merge pull request #34618 from qarmin/vector_please_dont_crash 2020-01-02 15:44:41 +01:00
version.h PCK: Set VERSION_PATCH in header, factor out header magic 2020-01-06 13:13:17 +01:00
vmap.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
vset.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00