Commit Graph

25 Commits

Author SHA1 Message Date
be86ce3103 Apply iwyu suggestion in core. 2024-12-19 00:43:47 +08:00
a497a5cb3e [Core] Codestyle improvements to math types 2024-03-04 18:17:10 +01:00
c77ae051d5 Add and expose Basis/Transform2D/3D division by float operator 2023-12-20 18:24:03 -06:00
5fdc1232ef Add the ability to look-at in model-space.
This is a much simpler attempt to solve the same problem as #76060, but without breaking any compatibility.

* Adds a description of what model space is in the Vector3 enums (MODEL_* constants). This has the proper axes laid out for imported 3D assets.
* Adds the option to `look_at` using model_space, which uses Vector3.MODEL_FRONT as forward vector.

The attempt of this PR is to still break the assumption that there is a single direction of forward (which is not the case in Godot)
and make it easier to understand where 3D models are facing, as well as orienting them via look_at.
2023-05-24 10:10:24 +09:00
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
5da515773d Add is_finite method for checking built-in types 2022-10-08 13:25:08 +08:00
43722dbcbc Use float literals for float calculations in Color 2022-10-07 11:28:47 -05:00
c139d9ef7d Discontinued spherical_interpolate_with in Transform3D 2022-08-31 16:35:38 +09:00
f242f9c738 Fix consistency of translated/scaled/rotated in Transform2D and Transform3D 2022-08-02 23:38:14 +02:00
a5f12f9c21 Merge pull request #63532 from TokageItLab/rename-cubic-slerp 2022-07-28 10:39:33 +02:00
199ea349f5 Merge pull request #57698 from bluenote10/feature/rename_translated_to_translated_local 2022-07-28 10:03:07 +02:00
4211e68d80 rename and unify notation for spherical interpolation 2022-07-27 23:22:50 +09:00
4b13a6dcb8 add equal checks to Transform3D::looking_at and Transform3D::set_look_at 2022-07-25 13:39:40 -05:00
2bf9e6090c rename translate(d) to translate(d)_local in Transform 2D/3D 2022-07-16 11:47:54 +02:00
e7a58a7eb6 Core: Rename math 'phi' arguments to 'angle' 2022-05-05 14:17:39 +02:00
fa7a7795f0 Rename Basis get_axis to get_column, remove redundant methods 2022-05-03 09:37:47 -05:00
6af77c7b09 Merge pull request #53684 from TokageItLab/orthogonal-mode 2022-01-05 16:05:40 +01:00
fe52458154 Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
61759da5b3 Fix some gizmo behavior to make more consistent 2021-12-25 03:24:04 +09:00
3b11e33a09 clang-format: Disable alignment of operands, too unreliable
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`.
2021-10-28 15:19:35 +02:00
9f3ae0adcd Move code for looking_at to Basis 2021-08-01 12:49:02 -05:00
bd6ed3fb09 Allow multiplying Transforms and Basis by numbers 2021-06-15 22:26:29 -04:00
554c776e08 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).

For the number of decimals printed, they now use String::num_real which works best with real_t, except for Color which is fixed at 4 decimals (this is a reliable number of float digits when converting from 16-bpc so it seems like a good choice)
2021-06-11 10:53:20 -04:00
8acd13a456 Rename Quat to Quaternion 2021-06-04 18:14:32 +01:00
a3c29ed899 Rename files and the exposed name for Transform3D 2021-06-03 07:30:01 -04:00