virtualx-engine/servers
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
..
arvr SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
audio SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
camera SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
physics Revert "Allow Area2D and 3D mouse events without a collision layer" 2020-07-27 22:46:04 +02:00
physics_2d Revert "Allow Area2D and 3D mouse events without a collision layer" 2020-07-27 22:46:04 +02:00
visual Optimize octree and fix octree leak 2020-08-18 11:02:21 +01:00
arvr_server.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
arvr_server.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
audio_server.cpp Add default 50ms output_latency web override. 2020-07-02 14:30:23 +02:00
audio_server.h Move mixrate and latency definition to AudioServer 2020-05-18 16:40:33 +02:00
camera_server.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
camera_server.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
physics_2d_server.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
physics_2d_server.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
physics_server.cpp Check for motion in cast_motion() before doing Bullet convexSweepTest(). 2020-06-21 16:28:01 +01:00
physics_server.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
register_server_types.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
register_server_types.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
server_wrap_mt_common.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
visual_server.cpp Optimize octree and fix octree leak 2020-08-18 11:02:21 +01:00
visual_server.h Expose disable_render_loop property to GDScript 2020-06-18 11:59:29 +01:00