virtualx-engine/core/math
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
..
a_star.cpp AStar: Make get_closest_point() deterministic for equidistant points 2020-06-10 15:30:52 +02:00
a_star.h Implements estimate/compute_cost for AStar2D 2020-04-16 11:35:52 +02:00
aabb.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
aabb.h [3.2] Backport core documentation changes to 3.2 2020-07-21 21:22:54 -04:00
audio_frame.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
audio_frame.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
basis.cpp - Added more euler rotation orders support. 2020-06-18 11:29:28 +02:00
basis.h - Added more euler rotation orders support. 2020-06-18 11:29:28 +02:00
bsp_tree.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
bsp_tree.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
camera_matrix.cpp Fix aspect ratio on hmd projection matrix 2020-04-05 16:58:33 +10:00
camera_matrix.h Change CameraMatrix::get_viewport_size to get_viewport_half_extents 2020-01-22 18:22:00 +00:00
delaunay.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
disjoint_set.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
disjoint_set.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
expression.cpp Fix for Expression class: inner string can be single quoted 2020-06-11 09:41:13 +02:00
expression.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
face3.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
face3.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
geometry.cpp Fixed false positives in the culling system. 2020-04-28 17:14:06 -07:00
geometry.h Fixed false positives in the culling system. 2020-04-28 17:14:06 -07:00
math_defs.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
math_fieldwise.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
math_fieldwise.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
math_funcs.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
math_funcs.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
octree.h Optimize octree and fix octree leak 2020-08-18 11:02:21 +01:00
octree_definition.inc Optimize octree and fix octree leak 2020-08-18 11:02:21 +01:00
plane.cpp [3.2] Backport core documentation changes to 3.2 2020-07-21 21:22:54 -04:00
plane.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
quat.cpp Add explanations for errors related to Vector/Quat normalization 2020-01-24 14:19:23 +01:00
quat.h Add explanations for errors related to Vector/Quat normalization 2020-01-24 14:19:23 +01:00
quick_hull.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
quick_hull.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
random_number_generator.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
random_number_generator.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
random_pcg.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
random_pcg.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
rect2.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
rect2.h Turn Rect2's 'intersects_touch()' into an extra argument of 'intersects()' 2020-03-06 23:51:26 +01:00
SCsub SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
transform.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
transform.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
transform_2d.cpp Revert "Implement Skew in Node2D" 2020-06-22 10:26:06 +02:00
transform_2d.h Revert "Implement Skew in Node2D" 2020-06-22 10:26:06 +02:00
triangle_mesh.cpp Fixed false positives in the culling system. 2020-04-28 17:14:06 -07:00
triangle_mesh.h Fixed false positives in the culling system. 2020-04-28 17:14:06 -07:00
triangulate.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
triangulate.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
vector2.cpp Add explanations for errors related to Vector/Quat normalization 2020-01-24 14:19:23 +01:00
vector2.h Add explanations for errors related to Vector/Quat normalization 2020-01-24 14:19:23 +01:00
vector3.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
vector3.h Add explanations for errors related to Vector/Quat normalization 2020-01-24 14:19:23 +01:00