Yuri Sizov
d8ff69d53c
Extract ScriptInstance to simplify includes
...
This allows to include script_instance.h directly in the
generated gdvirtual.gen.inc, and remove excessive includes
from the codebase.
This should also allow Resource to use GDVIRTUAL macros,
which wasn't possible previously due to a circular dependency.
2023-09-06 22:54:38 +02:00
Jcrespo
528a76486c
Add inverse hyperbolic functions asinh()
, acosh()
& atanh()
...
GDScript has the following built-in trigonometry functions:
- `sin()`
- `cos()`
- `tan()`
- `asin()`
- `acos()`
- `atan()`
- `atan()`
- `sinh()`
- `cosh()`
- `tanh()`
However, it lacks the hyperbolic arc (also known as inverse
hyperbolic) functions:
- `asinh()`
- `acosh()`
- `atanh()`
Implement them by just exposing the C++ Math library, but clamping
its values to the closest real defined value.
For the cosine, clamp input values lower than 1 to 1.
In the case of the tangent, where the limit value is infinite,
clamp it to -inf or +inf.
References #78377
Fixes godotengine/godot-proposals#7110
2023-09-01 01:27:56 +02:00
Rémi Verschelde
faaf27f284
Fix various typos with codespell
...
Also includes typo fixes from #79993 , #80068 , #80276 , and #80303 .
Co-authored-by: betalars <contact@betalars.de>
Co-authored-by: spaceyjase <429978+spaceyjase@users.noreply.github.com>
Co-authored-by: Swarkin <102416174+Swarkin@users.noreply.github.com>
Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-08-07 13:09:47 +02:00
Yuri Roubinski
5f56aa88f8
Add the fill region methods to the AStarGrid2D
2023-07-15 16:52:29 +03:00
Rémi Verschelde
e4deaa2727
Merge pull request #76787 from RedworkDE/avoid-localvector-copy
...
Avoid making unnecessary copies of `LocalVector`
2023-06-20 00:01:55 +02:00
Matthew Jensen
8b188bda52
Consider all triangles for retention in Delaunay Triangulation
2023-06-17 11:18:30 -04:00
kleonc
77b8e0fcb7
Allow setting negative WorldBoundaryShape2D.distance through the editor
2023-06-14 14:54:00 +02:00
Lyuma
9aa46bf3f5
Fix for SkeletonIK3D interpolation and bone roll
...
Fix bug in internal Basis::rotate_to_align function (also used with identity Basis in scene/resources/curve.cpp)
Use ChainItem children rather than local bone rest to determine IK bone roll to match Godot 3.x behavior
2023-06-05 20:44:45 -07:00
smix8
66a8418a2d
Remove unnecessary Clipper lib includes
...
Removes unnecessary Clipper lib includes.
2023-05-24 23:57:08 +02: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
bonjorno7
283cac859c
Make ok_color functions static
...
It needs to be a class to prevent build errors, but the functions can at least be static, so you don't have to instance the class.
2023-05-13 16:57:19 +02:00
Rémi Verschelde
cc48827e4a
Merge pull request #76946 from AThousandShips/shadow_warning
...
Enable shadow warnings and fix raised errors
2023-05-12 10:04:09 +02:00
Rémi Verschelde
863bcd3e2b
Merge pull request #76936 from clayjohn/revert-hsl
...
Revert "Add API for HSL conversion"
2023-05-12 10:03:21 +02:00
Ninni Pipping
71ee65dc57
Enable shadow warnings and fix raised errors
2023-05-11 16:00:59 +02:00
lawnjelly
50c5ed4876
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-05-11 08:34:34 +01:00
clayjohn
f83a90192f
Revert "Add API for HSL conversion"
...
This reverts commit 0b7fd664c1
.
2023-05-10 17:45:56 -03:00
Rémi Verschelde
0f444f101a
Merge pull request #76661 from bonjorno7/hsl
...
Add API for HSL conversion
2023-05-09 19:28:35 +02:00
bonjorno7
0b7fd664c1
Add API for HSL conversion
...
Math ported pretty much 1:1 from https://en.wikipedia.org/wiki/HSL_and_HSV
Style doesn't match the existing HSV code exactly, but should be close enough.
2023-05-09 17:43:10 +02:00
RedworkDE
1324c7d06a
Avoid making unnecessary copies of LocalVector
2023-05-06 20:39:03 +02:00
Clay John
610877e326
Merge pull request #72288 from MewPurPur/use-string-repeat
...
Use `String.repeat()` to optimize several String methods
2023-05-05 09:56:48 -07:00
VolTer
6b84e258d2
Use String.repeat() in more places
2023-05-01 02:27:46 +02:00
Danil Alexeev
76ee3d4f31
Allow negative coordinates in AStarGrid2D
2023-04-26 09:29:33 +03:00
Aaron Franke
290b09b36c
Expose determinant
in Transform2D, rename internal method
2023-04-22 13:44:14 -05:00
Danil Alexeev
36bedd341a
Fix misuses of error macros
2023-04-18 10:20:48 +03:00
VolTer
846f9e106c
Optimize 2D Delaunay and make it more readable
...
Co-authored-by: Dimitri Tabatadze <tabatadzedima@protonmail.com>
2023-04-09 00:52:15 +02:00
Yuri Rubinsky
d11bb866ff
Fix randfn to prevent generating of nan values
2023-03-03 16:43:48 +03:00
Rémi Verschelde
491ded1898
Minor typo and docs URL fixes
2023-02-28 13:38:01 +01:00
lawnjelly
f42a837e92
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.
This is fixed, and the warning message for contention is removed as multithread mode seems to be desired in production in 4.x.
2023-02-20 15:15:18 +00:00
clayjohn
5a800e68f1
Bias octahedral tangent y axis to avoid errors around 0
2023-02-13 19:24:14 -08:00
Rémi Verschelde
8f46656ae4
Merge pull request #72316 from 0xafbf/component-wise-minmax
...
Added component-wise `min` and `max` functions for vectors
2023-02-11 22:05:12 +01:00
Andrés Botero
a90e151b2a
Added component-wise min
and max
functions for vectors
2023-02-11 15:03:11 -05:00
Rémi Verschelde
f011d8ca9c
Math: Prevent division by zero in posmod
...
Fixes #43932 .
Co-authored-by: David Hoppenbrouwers <david@salt-inc.org>
2023-02-11 20:44:45 +01:00
Silc Renew
1459b9c24c
Fix scaled_orthogonal() & subgizmo global scaling
2023-02-04 00:46:04 +09:00
Rémi Verschelde
e52213e2fa
More codespell fixes, do more changes from previous ignore list
2023-02-01 12:11:36 +01:00
Rémi Verschelde
394bb0ee2b
Fix various typos with codespell
...
Finally do the childs -> children rename too.
2023-02-01 08:45:41 +01:00
Aaron Franke
5f3d3722b2
Add support for interpolating skewed transforms
2023-01-28 18:28:42 -06:00
Yuri Rubinsky
0f8f0ab126
Merge pull request #72170 from Chaosus/astar_fix
2023-01-27 18:52:22 +03:00
Rémi Verschelde
f0e3c3f4c3
Merge pull request #72168 from RandomShaper/sensible_lock_return
...
Booleanize various sync primitives' wait & locking methods
2023-01-27 15:40:43 +01:00
Yuri Rubinsky
cc0a243ce0
Enchance the performance of AStar by using a LocalVector(2)
2023-01-27 16:28:11 +03:00
Pedro J. Estébanez
f630940591
Booleanize various sync primitives' wait & locking methods
2023-01-27 11:15:30 +01:00
bitsawer
8c25bcdb84
Fix range loop iteration regressions
2023-01-26 00:14:39 +02:00
Rémi Verschelde
5b1df48c6c
Convert en_GB spelling to en_US with codespell
2023-01-23 11:02:20 +01:00
Rémi Verschelde
5726bf578d
Merge pull request #71676 from vnen/gdscript-unicode-identifiers
...
Add support for Unicode identifiers in GDScript and Expression
2023-01-23 10:24:33 +01:00
Yuri Rubinsky
078600a3c4
Enchance the performance of AStar
by using a LocalVector
2023-01-22 12:04:41 +03:00
kobewi
615c517034
Use range iterators in LocalVector loops
2023-01-21 18:44:42 +01:00
George Marques
86ee5f39c4
Add support for Unicode identifiers in Expression class
2023-01-21 13:39:42 -03:00
kobewi
c0083e431b
Cleanup unused engine code v2
2023-01-19 13:02:18 +01:00
Raul Santos
7560340ef6
Rename center
method to get_center
in Plane.
2023-01-15 17:18:50 +01:00
Yuri Rubinsky
6640eb8065
Fix error in AstarGrid2D::get_id_path
2023-01-08 10:34:33 +03:00
Yuri Rubinsky
4a45c76737
Fix jumping in AStarGrid2D
when DIAGONAL_MODE_NEVER
is enabled
2023-01-06 13:40:24 +03:00
Rémi Verschelde
e5f6e03490
Merge pull request #70547 from TokageItLab/pingpong-wrap
...
Fix pingpong-loop with `loop_wrap` is not working & clean-up cubic interpolation key retrieve process
2023-01-06 00:10:18 +01: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
Yuri Rubinsky
b28571ca3e
Optimize wrapf
function a bit
2023-01-01 23:17:29 +03:00
Silc Renew
8745c206c4
Fix pingpong with loop wrap is not working
2022-12-25 18:16:38 +09:00
Yuri Rubinsky
16efd0b0fc
Divide AStarGrid2D::default_heuristic
into two different heuristics
2022-12-24 09:31:02 +03:00
Rémi Verschelde
186f6f0d87
Merge pull request #70403 from rburing/fix_edge_map_capacity
...
Fix edge map capacity in convex hull computer
2022-12-21 18:29:38 +01:00
Ricardo Buring
e0e45e013e
Fix edge map capacity in convex hull computer
...
The desired capacity could be less than the default, so reserve would
error.
2022-12-21 17:12:36 +01:00
Yuri Rubinsky
0bcbf8e00d
Add get_point_position
method to AStarGrid2D
2022-12-20 23:21:38 +03:00
Yuri Rubinsky
8c478dcec9
Restore weight scale for AStarGrid2D
(partially)
2022-12-20 12:22:32 +03:00
bruvzg
53c76fa5d1
[RTL/TextServer] Add baseline inline alignment mode for objects and RTL tables.
2022-12-15 23:16:02 +02:00
Hei
cc245ff8a6
Fix "p_zfar" to "p_znear" in Projection.create_orthogonal
...
Was confused why it always gave inf:s.
2022-12-15 19:03:33 +02:00
Rémi Verschelde
4a8b725bc9
Merge pull request #68386 from MewPurPur/snappedi-snappedf
...
Implement snappedi, snappedf, and Vector[2/3/4]i.snapped
2022-11-24 18:54:49 +01:00
Silc Renew
b217c41d36
Refactor interpolating functions in some classes to use Math class
2022-11-24 20:31:43 +09:00
Yaohua Xiong
f9fa182abc
Refactor Curve3D::_bake() method
...
The main change is to caculate tangent directly from bezier curve, without going
through discretized polyline, avoiding pitfalls of discretization.
Other changes are:
1. Add an bezier_derivative() method for Vector3, Vector2, and Math;
2. Add an tesselate_even_length() method to Curve3D, which tesselate bezier curve to even length segments adaptively;
3. Cache the tangent vectors in baked_tangent_vector_cache;
2022-11-24 10:52:06 +08:00
VolTer
e26f0906f2
Implement snappedi, snappedf, and Vector[2/3/4]i.snapped
2022-11-19 06:18:55 +01:00
Andy Maloney
cb6cffbfd9
Static analysis: remove "break" after "return"
...
Changes as requested to keep in sync with godotengine/godot-cpp#929
2022-11-18 17:57:33 -05:00
Hugo Locurcio
efe3220b2e
Fix periods in editor strings and messages
...
- Ensure all strings with ellipsis end with 3 periods instead of 2.
- Fix extraneous period in "Error calling from signal '...' to callable"
messages.
2022-11-14 19:36:36 +01:00
Aaron Franke
9e952c8386
Allow getting Quaternion rotation in different Euler orders
2022-11-02 19:20:10 -05:00
Rémi Verschelde
08d56ac2f1
Merge pull request #66747 from aaronfranke/move-euler-order
...
Move EulerOrder enum to math_defs.h and global scope
2022-11-02 22:37:12 +01:00
Aaron Franke
8556fdd4bc
Move EulerOrder enum to math_defs.h and global scope
2022-11-02 13:44:13 -05:00
Rémi Verschelde
f7c611ab71
Style: Misc docs and comment style and language fixes
...
- Removed empty paragraphs in XML.
- Consistently use bold style for "Example:", on a new line.
- Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`).
- Fix invalid usage of backticks for inline code in BBCode.
- Fix some American/British English spelling inconsistencies.
- Other minor fixes spotted along the way, including typo fixes with codespell.
- Don't specify `@GlobalScope` for `enum` and `constant`.
2022-11-02 19:01:18 +01:00
Aaron Franke
83634119d4
Replace Quaternion Euler constructor with from_euler
method
2022-11-01 09:28:12 -05:00
Rémi Verschelde
926429392a
Merge pull request #67057 from Anutrix/rng-generator-default-seed
2022-10-13 21:17:09 +02:00
Juan Linietsky
71d2e38cb5
Optimize Convex Collision
...
Implements the Gauss Mapping optimization to SAT convex collision test.
* Described [here](https://ubm-twvideo01.s3.amazonaws.com/o1/vault/gdc2013/slides/822403Gregorius_Dirk_TheSeparatingAxisTest.pdf ) by Dirk Gregorius.
* Requires adding of face information to edges in MeshData
* Took the chance to convert MeshData to LocalVector for performance.
2022-10-13 19:07:53 +02:00
Anutrix
a871114339
Randomize RandomNumberGenerator instances' default seed
2022-10-08 12:26:26 +05:30
Haoyu Qiu
5da515773d
Add is_finite
method for checking built-in types
2022-10-08 13:25:08 +08:00
Aaron Franke
43722dbcbc
Use float literals for float calculations in Color
2022-10-07 11:28:47 -05:00
bruvzg
0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4.
2022-10-07 11:32:33 +03:00
Aaron Franke
97d232c11d
Enhancements to includes in core data structures
2022-10-05 23:11:02 -05:00
Aaron Franke
2cea42cc7f
Rename Projection matrix
to columns
2022-10-04 12:34:19 -05:00
Rémi Verschelde
a377c5ca22
Merge pull request #66655 from MisterMX/feat/astargrid2d-vector2i
...
refactor(AStarGrid2D): Return `Vector2i` in `get_id_path`
2022-10-03 09:24:40 +02:00
Rémi Verschelde
d9a3888cea
Merge pull request #66133 from aaronfranke/set-all
...
Delete `set_all`, `set_axis`, and `get_axis` methods from Vector2/3/3i/4/4i
2022-10-03 09:23:46 +02:00
MisterMX
bf19a1d3b3
refactor(AStarGrid2D): Return Vector2i in get_id_path
...
Signed-off-by: MisterMX <mbxd12@web.de>
2022-09-30 12:02:28 +02:00
bruvzg
ea1848ce0a
Use constexpr
in the conditions with template parameters and sizeof
s to suppress C4127 warnings.
2022-09-29 10:38:21 +03:00
Rémi Verschelde
d9b251c95c
Merge pull request #66544 from lawnjelly/bvh_tree_sibling_warning
...
Fix false flag compiler warning in bvh tree
2022-09-28 20:47:38 +02:00
lawnjelly
d7c6993f58
Fix false flag compiler warning in bvh tree
...
Compiler wrongly warns that sibling_id may be used when uninitialized. This PR sets the value to silence the warning.
2022-09-28 15:33:41 +01:00
Rémi Verschelde
926c1127e9
Merge pull request #66435 from akien-mga/style-header-guards-cleanup
...
Cleanup header guards for consistency
2022-09-26 15:48:56 +02:00
Rémi Verschelde
49fcf4ffad
Style: Cleanup header guards for consistency
...
Fix file names for {Static,Lightmap}RaycasterEmbree.
2022-09-26 13:51:17 +02:00
Yuri Rubinsky
e7e1f84854
Fix processing of some types in math_fieldwise.cpp/fieldwise_assign
2022-09-26 13:22:49 +03:00
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
436dcb3286
Remove set_all methods from Vector2/3/4
2022-09-19 15:08:50 -05:00
Aaron Franke
fd8bd27657
Remove set_axis and get_axis methods from Vector2/2i/3/3i/4/4i
2022-09-19 15:08:50 -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
Fabian Keller
2bf9e6090c
rename translate(d) to translate(d)_local in Transform 2D/3D
2022-07-16 11:47:54 +02:00
lawnjelly
1f69666209
Remove Octree
...
Octree is no longer used in 4.x.
2022-07-06 14:10:05 +01:00
cdemirer
0ccde38668
Expression built-in functions can also be considered as identifiers in subscripts
2022-07-04 13:25:43 +03:00
Rémi Verschelde
b863c40356
Merge pull request #62468 from V-Sekai/core-const-expressions
...
Add a const call mode to Object, Variant and Script.
2022-06-28 01:08:24 +02:00
Rémi Verschelde
25baa32db0
Merge pull request #62458 from Geometror/interpolation-function-cleanup
...
Refactor Bezier interpolation functions
2022-06-27 23:25:33 +02:00
K. S. Ernest (iFire) Lee
9ddebc0c22
Add a const call mode to Object, Variant and Script.
...
For this to work safely (user not call queue_free or something in the expression), a const call mode was added to Object and Variant (and optionally Script).
This mode ensures only const functions can be called, making it safe to use from the editor.
Co-Authored-By: reduz <reduzio@gmail.com>
2022-06-27 13:33:06 -07:00
Hendrik Brucker
99ce0df3b1
Refactor bezier interpolation functions
2022-06-27 19:42:43 +02:00
reduz
7acf697479
Fix VECTOR/LOCAL transitions in Node3D
...
Fixes #62225 , supersedes #62227
2022-06-27 13:45:35 +02:00
reduz
3d1ab570b9
Add surface indices to TriangleMesh
...
Helps unblock #56597
2022-06-22 21:48:23 +02:00