Commit Graph

91 Commits

Author SHA1 Message Date
a5d8696021 Ported: Vertex cache optimizer
Optimizes indices to make good use of vertex cache on GPU.
- lawnjelly
0aa22b8f13
2024-02-08 21:35:01 +01:00
A Thousand Ships
8341ddc450 Fix AABB.encloses failing on shared upper bound
This differs from `Rect2` and was fixed for those classes in the past
2024-02-08 14:00:08 +01:00
Bastien JAUNY
15cccb331f Fix unitialized variables in core 2024-02-08 13:43:25 +01:00
22ec1be9b3 File copyright header updates pt3. 2023-12-17 22:42:34 +01:00
337c99e52f File copyright header updates pt1. 2023-12-17 22:29:33 +01:00
3902cf1924 Moved ScneeStringNames and PropertyUtils into scene/main. 2023-12-10 18:01:51 +01:00
7ec207ba27 Fix abs call. 2023-12-10 14:58:37 +01:00
风青山
f7f7c17962 BVH - fix axis getting mixed up when split leaf
Split preferentially on longest axis, rather than shortest axis.
2023-10-02 16:56:12 +02:00
风青山
1813300d53 BVH - fix not refitting upward from leaf nodes
Fix leaf node possibly not updating aabb due to wrong node id.

Additionally, when requesting a new leaf, mark `dirty` as `false` in `clear()`.
2023-10-02 16:55:52 +02:00
d977ed360e Ported: 2D Fixed Timestep Interpolation
Adds support to canvas items and Camera2D.
- lawnjelly
5162efbfe9
2023-08-27 18:48:25 +02:00
834cbe8cef Ported: Single Compilation Unit build.
Adds support for simple SCU build.
This speeds up compilation by compiling multiple cpp files within a single translation unit.
- lawnjelly
43e181a00a
2023-07-11 16:07:36 +02:00
d3f2e0e4fe Fixed SkeletonModification3DFABRIK. 2023-06-22 09:43:55 +02:00
6c9843e5cb Ported: Test, refactor and fix a bug in Basis.get_axis_angle
- fabriceci
9f1a57d48b
2023-06-11 09:45:23 +02:00
e21a020b86 Add unsafe version from asin and acos. 2023-06-11 08:45:19 +02:00
lawnjelly
22d90711da Make acos and asin safe
A common bug with using acos and asin is that input outside -1 to 1 range will result in Nan output. This can occur due to floating point error in the input.

The standard solution is to provide safe_acos function with clamped input. For Godot it may make more sense to make the standard functions safe.
2023-06-11 08:41:42 +02:00
2e1e153bc3 Make MultiMeshInstance2DNavigationGeometryParser2D use the Geometry singleton. And by proxy clipper 1. 2023-06-07 15:25:32 +02:00
6eb37ff901 Ported clipper2 usage to clipper1 in PandemoniumNavigationMeshGenerator. Also moved them to the Geometry singleton. 2023-06-07 09:20:36 +02:00
59933a9e60 Added grow_by and to_rect2 helper method to Rect2i. 2023-05-30 19:33:12 +02:00
0f6fb760ad Now Basis::get_uniform_scale() returns a real_t instead of a float. 2023-05-29 16:08:59 +02:00
47e637b2b8 Mark the parameters of Basis::rotate_to_align as const ref. 2023-05-29 13:03:26 +02:00
9e326c3000 Apparently Basis::rotate_to_align had a bug. Ported the fix by lyuma from: 6dfa6fc50e 2023-05-28 07:26:04 +02:00
96d1c2d69c Fix small inconsistencies in Vector3/3i/4/4i apis. 2023-05-27 13:26:52 +02:00
33b0d2da34 Added set_all() to Vector3i. 2023-05-27 11:53:16 +02:00
2b24871814 Made the parameter of snap and snapped in Vector3 const reference. 2023-05-27 11:12:31 +02:00
25e57a4268 Added erf to Math. 2023-04-22 13:00:28 +02:00
e80dfcee2e Added a Math singleton exposing math functions directly to scripts. The idea is to make the disrepancies between scripts and engine side code smaller. 2023-04-22 12:47:56 +02:00
4ab9936fc8 Added log10 to the Math class. 2023-04-22 11:00:24 +02:00
d6442bc57c Added Size and Point typedefs for Vector3i and Vector4i. 2023-04-16 16:16:56 +02:00
9118798036 Fix include. 2023-03-12 16:05:58 +01:00
Rémi Verschelde
f3e1aab267 Math: Prevent division by zero in posmod
Fixes #43932.

Co-authored-by: David Hoppenbrouwers <david@salt-inc.org>
(cherry picked from commit f011d8ca9ca25232fb335eead1c8eeaf5c7f2c54)
2023-03-12 15:43:52 +01:00
lawnjelly
4684c72b92 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.
2023-03-12 14:20:02 +01:00
2cd4e4d828 Renamed Set to RBSet. 2023-01-15 19:42:08 +01:00
1b0aac6028 Renamed Map to RBMap. 2023-01-15 19:12:50 +01:00
5972b6cc43 Removed the deprecated clamped() method from vector2. (The new method is limit_length().) 2023-01-15 14:05:45 +01:00
lawnjelly
60b6e83948 Fix array-bounds warning in BVH
Provides a workaround to prevent tripping a compiler warning.

(cherry picked from commit 91d252c69795cdfc53e71c553edcff665636ea16)
2022-12-11 19:15:04 +01:00
5aa98e8955 Added Brenzenham's line algorithm found in the TileMapEditorPlugin to Geometry, and it's binder class. 2022-11-20 02:33:40 +01:00
Rémi Verschelde
43de2b9ecc Style: Ensure consistent formatting with clang-format 15 2022-10-08 16:48:59 +02:00
Marcel Admiraal
226e29cfca Fix Geometry::get_closest_points_between_segments() returns NaN
Also fix Geometry::get_closest_distance_between_segments() returning
incorrect values.
2022-09-16 22:48:50 +02:00
e2d42db711 Also renamed the files. 2022-08-19 21:24:36 +02:00
6be9bf5dfe Cleaned up and added the skeleton modification stack implementations to the build. Also smaller fixes. 2022-08-18 15:41:28 +02:00
9757c39f05 Moved a few more core classes. 2022-08-17 17:43:49 +02:00
be16fe23ad Moved the error macros. 2022-08-17 15:14:19 +02:00
220b2db443 Moved String and related classes under a string folder in core. 2022-08-17 14:19:55 +02:00
dc9cc716c7 Moved Object related classes under core/object. 2022-08-17 13:45:14 +02:00
9555ee56b9 Moved Variant related classes under a variant folder in core. 2022-08-17 13:17:12 +02:00
388b88678e Moved container related classes in core under a new containers directory. 2022-08-17 12:53:49 +02:00
0d2fc2e9f2 Moved color to core/math. 2022-08-17 11:38:15 +02:00
d9669b0ed0 Ported form godot4: Reformat structure string operators
The order of numbers is not changed except for Transform2D. All logic is done inside of their structures (and not in Variant).
-aaronfranke
554c776e08
2022-08-16 22:46:24 +02:00
3b4b25b5f8 Add working bindings for Projection's get_projection_plane. 2022-08-16 22:33:56 +02:00
9e1588160f Now all Variant math types are structs. 2022-08-16 22:09:26 +02:00