lawnjelly
91d252c697
Fix array-bounds warning in BVH
...
Provides a workaround to prevent tripping a compiler warning.
2022-09-22 16:06:25 +01:00
Rémi Verschelde
5408af1407
Style: Ensure consistent formatting with clang-format 15
...
When going from version 14 to 15 it would introduce a tiny change in
`websocket_macros.h` just before the comment re-enabling clang-format,
but this can be solved by just letting it do its work.
Bonus cosmetic change in `math_fieldwise.cpp` where clang-format isn't
used, and bump recommended versions for pre-commit hook to [13; 15].
2022-09-21 12:48:58 +02:00
Aaron Franke
50fb0220ca
Define AXIS_COUNT in all vector types
2022-09-19 17:50:35 -05:00
Aaron Franke
300fc5e39a
Spacing changes in math_funcs.h
2022-09-19 02:22:50 -05:00
fabriceci
9f1a57d48b
Test, refactor and fix a bug in Basis.get_axis_angle
2022-09-14 12:05:22 +02:00
Yuri Rubinsky
533e3669e7
Fix incorrect heuristic order in AStarGrid2D
2022-09-12 13:16:46 +03:00
Rémi Verschelde
5062aafc2d
Merge pull request #64417 from aaronfranke/has-space
...
Replace AABB/Rect2/Rect2i has_no_* methods with has_* methods
2022-09-06 17:00:44 +02:00
Micky
b6daad8d4b
Rename range_lerp
to remap
2022-09-06 07:19:20 +02:00
Aaron Franke
995b9f94e8
Replace Rect2(i) has_no_area with has_area
2022-09-04 23:03:36 -05:00
Aaron Franke
817ae95667
Replace AABB has_no_volume with has_volume
...
Also replace has_no_surface with has_surface
2022-09-04 23:03:36 -05:00
Aaron Franke
058ac331b0
Minor fixes to Vector4
2022-09-04 20:38:44 -05:00
Jonathan Nicholl
15d057c521
Add is_zero_approx
methods to Vector2
, 3
, and 4
2022-09-02 00:29:50 -04:00
Johan Aires Rastén
b7e2d45233
Replace Vector2(i) with Size2(i) for methods returning a size
2022-09-01 20:04:17 +02:00
Rémi Verschelde
f02134a8c0
Merge pull request #55617 from madmiraal/fix-55384
2022-09-01 18:20:01 +02:00
Rémi Verschelde
0c221f0284
Merge pull request #65124 from zhehangd/fix_basis
2022-09-01 09:36:11 +02:00
Zhehang Ding
69fe6336f1
Basis constructor: row vectors -> column vectors
2022-08-31 21:20:25 -07:00
Silc Renew
c139d9ef7d
Discontinued spherical_interpolate_with in Transform3D
2022-08-31 16:35:38 +09:00
Yuri Rubinsky
4d7c1b92e9
Implement AStarGrid2D
class with jump-point pathfinding
2022-08-30 17:29:23 +03:00
Marcel Admiraal
0046d320bb
Fix Geometry3D::get_closest_points_between_segments() returns NaN
...
Also fix:
- Geometry3D::get_closest_distance_between_segments() returning
incorrect values.
- Test for Geometry3D::get_closest_distance_between_segments() testing for
an incorrect value.
2022-08-30 12:13:11 +01:00
Silc Renew
931fb4dc11
Add linear/cubic angle interpolation to Animation interpolation type
2022-08-27 07:58:22 +09:00
Micky
59e11934d8
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`
2022-08-26 14:58:22 +02:00
Rémi Verschelde
b9919fd87d
Merge pull request #64678 from TokageItLab/implement-ease-baker
...
Fix Quaternion Tween and add Easing baker to AnimationTrackEditor
2022-08-23 09:19:21 +02:00
kobewi
8be27dc59e
Replace Array return types with TypedArray
2022-08-22 22:42:36 +02:00
Rémi Verschelde
7b4927bb5f
Merge pull request #60309 from The-O-King/oct
2022-08-22 19:29:21 +02:00
Rémi Verschelde
944bfc6d00
Merge pull request #63602 from TokageItLab/cubic-interp-time
2022-08-22 17:32:47 +02:00
Silc Renew
f7dd83ce60
Fix Quaternion Tween and implement ease baker
2022-08-22 19:04:58 +09:00
rafallus
da7a5653f4
Expose Basis set_orthogonal_index
method as a GridMap function
2022-08-20 21:42:20 -05:00
Silc Renew
dded7c72c1
Make cubic_interpolate()
consider key time in animation
2022-08-19 14:48:37 +09:00
Omar El Sheikh
78881b3cc3
Octahedral Normal/Tangent Compression
...
Implementation of Octahedral normal compression into Godot 4.0
2022-08-13 08:09:32 -07:00
antonWetzel
40a1d6d100
vector4 distance_squared_to and update csharp
2022-08-09 01:59:17 +02:00
Hendrik Brucker
36061c5dca
Vector4/Vector4i: Add missing methods, tests and fix change of sign operator
2022-08-07 12:25:05 +02:00
Aaron Franke
88f5b0d563
Check if the axis is zero / vectors are colinear in Vector3 slerp
2022-08-04 14:32:54 -05:00
Fabian Keller
f242f9c738
Fix consistency of translated/scaled/rotated in Transform2D and Transform3D
2022-08-02 23:38:14 +02:00
Raul Santos
2e5cf62dee
Fix Vector4::min_axis_index
for equal components
...
The documentation says if all components are equal it must return AXIS_W but it was returning AXIS_X.
2022-08-01 04:50:17 +02:00
Silc Renew
90dc2f961e
Make spherical_cubic_interpolate()
more stable
2022-07-29 17:39:22 +09:00
Rémi Verschelde
a5f12f9c21
Merge pull request #63532 from TokageItLab/rename-cubic-slerp
2022-07-28 10:39:33 +02:00
Rémi Verschelde
199ea349f5
Merge pull request #57698 from bluenote10/feature/rename_translated_to_translated_local
2022-07-28 10:03:07 +02:00
Rémi Verschelde
13a9d5e3c0
Merge pull request #63378 from nathanfranke/t3d-errors
...
Add equal checks to Transform3D::looking_at and Transform3D::set_look_at, fixes misleading error.
2022-07-28 09:25:25 +02:00
Silc Renew
4211e68d80
rename and unify notation for spherical interpolation
2022-07-27 23:22:50 +09:00
Rémi Verschelde
89527db8d3
Merge pull request #63380 from V-Sekai/fix-cubic-slerp-dot
2022-07-27 13:20:02 +02:00
Rémi Verschelde
1c57d90e85
Merge pull request #63463 from KoBeWi/Vector5
...
Add some missing Vector4 methods
2022-07-27 10:45:39 +02:00
Rémi Verschelde
cda723d201
Color: Fix resetting alpha when setting H/S/V separately
...
Fixes #63487 .
2022-07-26 15:43:49 +02:00
kobewi
7006f7d693
Add some missing Vector4 methods
2022-07-26 02:35:42 +02:00
Nathan Franke
4b13a6dcb8
add equal checks to Transform3D::looking_at and Transform3D::set_look_at
2022-07-25 13:39:40 -05:00
Ricardo Buring
178405f7cb
Fixup BVH debugging statements
2022-07-25 18:21:53 +02:00
Silc 'Tokage' Renew
e252d4e6fe
Fix cubic_slerp
...
Co-authored-by: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>
Co-authored-by: Pasi Nuutinmaki <gnssstylist@sci.fi>
2022-07-25 22:44:39 +09:00
Rémi Verschelde
90019676b0
Code quality: Fix header guards consistency
...
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
reduz
455c06ecd4
Implement Vector4, Vector4i, Projection
...
Implement built-in classes Vector4, Vector4i and Projection.
* Two versions of Vector4 (float and integer).
* A Projection class, which is a 4x4 matrix specialized in projection types.
These types have been requested for a long time, but given they were very corner case they were not added before.
Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity.
**Q**: Why Projection and not Matrix4?
**A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
2022-07-23 14:00:01 +02:00
Yuri Rubinsky
ccc56cc6d4
Rename epsilon
to tolerance
in the Plane::has_point
method
2022-07-21 20:15:15 +03:00
fabriceci
db7c91e0ad
Fix the calculation of the angular velocity when the rotation speed is not high.
2022-07-19 10:27:13 +02:00