Commit Graph

22 Commits

Author SHA1 Message Date
A Thousand Ships a497a5cb3e
[Core] Codestyle improvements to math types 2024-03-04 18:17:10 +01:00
Aaron Franke c77ae051d5
Add and expose Basis/Transform2D/3D division by float operator 2023-12-20 18:24:03 -06:00
Juan Linietsky 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
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
Haoyu Qiu 5da515773d Add `is_finite` method for checking built-in types 2022-10-08 13:25:08 +08:00
Aaron Franke 97d232c11d
Enhancements to includes in core data structures 2022-10-05 23:11:02 -05:00
Silc Renew c139d9ef7d Discontinued spherical_interpolate_with in Transform3D 2022-08-31 16:35:38 +09:00
Fabian Keller f242f9c738 Fix consistency of translated/scaled/rotated in Transform2D and Transform3D 2022-08-02 23:38:14 +02:00
Rémi Verschelde a5f12f9c21
Merge pull request #63532 from TokageItLab/rename-cubic-slerp 2022-07-28 10:39:33 +02:00
Silc Renew 4211e68d80 rename and unify notation for spherical interpolation 2022-07-27 23:22:50 +09:00
Fabian Keller 2bf9e6090c rename translate(d) to translate(d)_local in Transform 2D/3D 2022-07-16 11:47:54 +02:00
Rémi Verschelde e7a58a7eb6 Core: Rename math 'phi' arguments to 'angle' 2022-05-05 14:17:39 +02:00
Aaron Franke 1bf94dff3a
Rename Basis "elements" to "rows" 2022-04-29 08:02:56 -05:00
Rémi Verschelde 5ddb518496
Core: Make all Variant math types structs
Some were declared as structs (public by default) and others as classes
(private by default) but in practice all these math types exposed as
Variants are all 100% public.
2022-02-04 16:48:24 +01:00
lawnjelly b411a731fe Add nodiscard to core math classes to catch c++ errors.
A common source of errors is to call functions (such as round()) expecting them to work in place, but them actually being designed only to return the processed value. Not using the return value in this case in indicative of a bug, and can be flagged as a warning by using the [[nodiscard]] attribute.
2022-01-20 13:07:49 +00:00
Rémi Verschelde 6af77c7b09
Merge pull request #53684 from TokageItLab/orthogonal-mode 2022-01-05 16:05:40 +01: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
Silc 'Tokage' Renew 61759da5b3 Fix some gizmo behavior to make more consistent 2021-12-25 03:24:04 +09:00
Aaron Franke ae1702bee5
Replace HTTP links with HTTPS for sites with HTTPS versions 2021-08-22 20:13:11 -05:00
lawnjelly dd0f54a368 Fix Transform::xform(Plane) functions
The Transform::xform and xform_inv are made safe for Planes when using non-uniform scaling.
Optimization of calling sites to prevent loss of performance from the changes to xform(Plane).
2021-08-07 11:10:50 +01:00
Aaron Franke bd6ed3fb09
Allow multiplying Transforms and Basis by numbers 2021-06-15 22:26:29 -04:00
Aaron Franke a3c29ed899
Rename files and the exposed name for Transform3D 2021-06-03 07:30:01 -04:00