Age | Commit message (Collapse) | Author |
|
change warnings=all to use /W4.
|
|
Remove usage of unitialized variables
|
|
|
|
|
|
`GodotCylinderShape3D::get_supports`: delete dead code
|
|
|
|
|
|
Fix file names for {Static,Lightmap}RaycasterEmbree.
|
|
|
|
make `body_set_state_sync_callback` take a `Callable`
|
|
|
|
a Callable
Prefer Callable to a C-style callback. This is helpful for GDExtension.
|
|
|
|
|
|
Rename `str2var` to `str_to_var` and similar
|
|
Affects the Math class, a good chunk of the audio code, and a lot of other miscellaneous classes, too.
- `var2str` -> `var_to_str`
- `str2var` -> `str_to_var`
- `bytes2var` -> `bytes_to_var`
- `bytes2var_with_objects` -> `bytes_to_var_with_objects`
- `var2bytes` -> `var_to_bytes`
- `var2bytes_with_objects` -> `var_to_bytes_with_objects`
- `linear2db` -> `linear_to_db`
- `db2linear` -> `db_to_linear`
- `deg2rad` -> `deg_to_rad`
- `rad2deg` -> `rad_to_deg`
- `dict2inst` -> `dict_to_inst`
- `inst2dict` -> `inst_to_dict`
|
|
|
|
Co-authored-by: Juan Linietsky <reduzio@gmail.com>
|
|
|
|
|
|
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
|
|
The former needs to be allocated once per usage. The later is shared for all threads, which is more efficient.
It can also be better debugged.
|
|
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
|
|
Clean up and do fixes to hash functions and newly introduced murmur3 hashes in #61934
* Clean up usage of murmur3
* Fixed usages of binary murmur3 on floats (this is invalid)
* Changed DJB2 to use xor (which seems to be better)
|
|
2D physics categories already had a 2D suffix: "Physics 2D"
|
|
|
|
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
|
|
|
|
This makes the intent explicit in each use case.
|
|
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
(order matters) but use is discouraged.
There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
|
|
|
|
Didn't commit all the changes where it wants to initialize a struct
with `{}`. Should be reviewed in a separate PR.
Option `IgnoreArrays` enabled for now to be conservative, can be
disabled to see if it proposes more useful changes.
Also fixed manually a handful of other missing initializations / moved
some from constructors.
|
|
|
|
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
|
|
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.
|
|
|
|
* Allows creating a GDExtension based 3D Physics Server (for Bullet, PhysX, etc. support)
* Some changes on native struct binding for PhysicsServer
This allows a 3D Physics server created entirely from GDExtension. Once it works, the idea is to port the 2D one to it.
|
|
Minimal approach to fixing regression whereby static areas where not detect dynamic areas.
|
|
[4.x] BVH - Sync BVH with 3.x
|
|
instead of for every shape
|
|
Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
|
|
Templated mask checks and generic NUM_TREES
Fix leaking leaves
|
|
It's a triangle, so the area should be halved.
Co-authored-by: Jeffrey Cochran <koenigcochran@gmail.com>
|
|
These are not used consistently and some can conflict with
system-specific defines. While here, also delete some unused macros.
|
|
Happy new year to the wonderful Godot community!
|
|
Improve RigidDynamicBody force and torque API
|
|
Fix rigid body ray cast CCD in 2D and 3D Godot Physics
|
|
For 2D:
Raycast CCD now works the same as in 3D, it changes the body's velocity
to place it at the impact position instead of generating a contact point
that causes a wrong push back.
For both 2D and 3D:
The raycast CCD process reads and modifies body velocities, so it needs
to be moved to pre_solve() instead of setup() to be processed linearly
on the main thread, otherwise multithreading can cause some CCD results
to be randomly lost when multiple collisions occur.
|
|
Makes the API for forces and impulses more flexible, easier to
understand and harmonized between 2D and 3D.
Rigid bodies now have 3 sets of methods for forces and impulses:
-apply_impulse() for impulses (one-shot and time independent)
-apply_force() for forces (time dependent) applied for the current step
-add_constant_force() for forces that keeps being applied each step
Also updated the documentation to clarify the different methods and
parameters in rigid body nodes, body direct state and physics servers.
|
|
|