Commit Graph

14 Commits

Author SHA1 Message Date
Thaddeus Crews
9903e6779b
Enforce template syntax typename over class 2024-03-07 22:39:09 -06:00
lawnjelly
f42a837e92 BVH - fix lockguards for multithread mode
Due to a lack of variable name, the BVH lock guards lifetimes previously did not cover the whole function call.

This is fixed, and the warning message for contention is removed as multithread mode seems to be desired in production in 4.x.
2023-02-20 15:15:18 +00:00
Rémi Verschelde
f0e3c3f4c3
Merge pull request #72168 from RandomShaper/sensible_lock_return
Booleanize various sync primitives' wait & locking methods
2023-01-27 15:40:43 +01:00
Pedro J. Estébanez
f630940591 Booleanize various sync primitives' wait & locking methods 2023-01-27 11:15:30 +01:00
kobewi
615c517034 Use range iterators in LocalVector loops 2023-01-21 18:44:42 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Ricardo Buring
178405f7cb Fixup BVH debugging statements 2022-07-25 18:21:53 +02:00
Rémi Verschelde
f8ab79e68a Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
2022-04-04 19:49:50 +02:00
lawnjelly
109d08c84a Add protective checks for invalid handle use in BVH
Adds DEV_ASSERTS that will halt at runtime if the BVH is misused with invalid IDs, and adds ERR_FAIL macros to prevent calling with invalid IDs.

Any such misuse is a bug in the physics, but this should flag any errors quickly.
2022-03-23 09:19:26 +00:00
lawnjelly
f8eaab5b47 BVH - Sync BVH with 3.x
Templated mask checks and generic NUM_TREES
Fix leaking leaves
2022-02-04 16:51:21 +00:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Lightning_A
e078f970db Rename remove() to remove_at() when removing by index 2021-11-23 18:58:57 -07:00
Hugo Locurcio
bcf4a56c74
Replace references to VisualServer in code comments with RenderingServer
VisualServer no longer exists in the `master` branch.
2021-10-07 15:49:41 +02:00
PouleyKetchoupp
3877ed73d0 Dynamic BVH broadphase in 2D & 3D Godot Physics
Port lawnjelly's dynamic BVH implementation from 3.x to be used in
both 2D and 3D broadphases.

Removed alternative broadphase implementations which are not meant to be
used anymore since they are much slower.

Includes changes in Rect2, Vector2, Vector3 that help with the template
implementation of the dynamic BVH by uniformizing the interface between
2D and 3D math.

Co-authored-by: lawnjelly <lawnjelly@gmail.com>
2021-05-10 16:28:55 -07:00