Although the expanded bounds were working in normal use, for moving and growing objects, there was one case which was not dealt with properly - significant shrinkage of exact bounds within an expanded bound.
This PR detects significant shrinkage and forces a new expanded bound to be created.
(cherry picked from commit ed47570266)
Some versions of microsoft compiler flag a warning that they want a typename keyword in templates in more places than clang / gcc.
(cherry picked from commit 9315b4fb51)
List of changes:
- Modified bvh class to handle 2D and 3D as a template
- Changes in Rect2, Vector2, Vector3 interface to uniformize template
calls
- New option in Project Settings to enable BVH for 2D Physics (enabled
by default like in 3D)
Complete rewrite of spatial partitioning using a bounding volume hierarchy rather than octree.
Switchable in project settings between using octree or BVH for rendering and physics.