Sets `AlignOperands` to `DontAlign`.
`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
The pair user data wasn't correctly updated in the BVH from the check
pair callback.
This could lead to crashes when the check caused logical unpairing in
physics, then actual unpairing from the broadphase occured and the
physics server tried to delete an already deleted pointer.
The BVH implementation is not checking collision layers on existing
pairs on move like other physics broadphases do.
This is solved by adding a new call to trigger pair callbacks again so
the physics engine can check layers again (specific to the BVH version,
other broadphase implementations just trigger a move like before).
The previous error message incorrectly suggested that any Basis could be fixed by calling get_rotation_quation() or orthonormalize(). This PR points out that only a valid rotation Basis can be fixed in this way.
(cherry picked from commit d3a3b3aff3)
Added one more warning to the hideable warnings. These seem to be benign warnings and are hidden during use in rooms and portals. When used from other areas, only one warning is displayed per run, instead of for every occurrence.
The Transform::xform and xform_inv are made safe for Planes when using non-uniform scaling.
Basic unit tests for Transform.
Optimization of calling sites to prevent loss of performance from the changes to xform(Plane).
Clean: remove duplicate and interior vertices (uses Bullet algorithm)
Simplify: modify the geometry for further simplification (uses VHACD
algorithm)
In the editor, single convex hull now uses the clean option.
Added a new editor entry to create a simplified convex hull, can be
useful for creating convex hull from highly tessellated triangle meshes.
Specific change for 3.x:
Add support for Vector<Vector3> and PoolVector<Vector3> in the convex hull generator.
Changes passing of current_tree from a member variable to a function argument, making bugs due to stale state less likely.
Fix a bug in deactivate where current_tree variable was stale. This may have resulted in visual anomalies.
The code is based on the current version of thirdparty/vhacd and modified to use Godot's types and code style.
Additional changes:
- backported and extended PagedAllocator to allow leaked objects
- applied patch from https://github.com/bulletphysics/bullet3/pull/3037
For the `master` branch, the minimum supported MSVC version is now
MSVC 2017 (with MSVC 2019 being recommended).
(cherry picked from commit b57d9c8005)
Dynamic BVH doesn't update the tree anymore when calling set_pairable
with no parameter change.
Also modified Godot Physics broadphase to create objects directly with
pairable (static) set correctly to make use of this optimization for the
BVH broadphase.
Note: Octree broadphase doesn't use this optimization because it forces
an update on move, so passing the proper AABB and static parameters on
creation would cause the tree to update twice.
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)
We've been using standard C library functions `memcpy`/`memset` for these since
2016 with 67f65f6639.
There was still the possibility for third-party platform ports to override the
definitions with a custom header, but this doesn't seem useful anymore.
Backport of #48239.