summaryrefslogtreecommitdiff
path: root/core/math
AgeCommit message (Collapse)Author
2021-12-02Merge pull request #55474 from akien-mga/copy-operators-no-referenceRémi Verschelde
2021-12-02Merge pull request #37626 from aaronfranke/rect2-warningsMax Hilbrunner
Print warnings when using a Rect2 or AABB with a negative size
2021-12-02Merge pull request #47294 from sebastian-heinz/patch-1Rémi Verschelde
2021-12-02Merge pull request #38604 from Calinou/astar-rename-get-point-idsRémi Verschelde
2021-12-02allow variant construction in expressionssebastian-heinz
2021-12-01Rename Vector parameters to be consistentRaul Santos
Renames parameters that were named differently across different scripting languages or their documentation to use the same name everywhere.
2021-11-30Warn when using an AABB or Rect2 with a negative sizeAaron Franke
2021-11-30Rename `AStar.get_points()` to `AStar.get_point_ids()` for clarityHugo Locurcio
The same has been done for AStar2D as well.
2021-11-30Don't return reference on copy assignment operatorsRémi Verschelde
We prefer to prevent using chained assignment (`T a = b = c = T();`) as this can lead to confusing code and subtle bugs. According to https://en.wikipedia.org/wiki/Assignment_operator_(C%2B%2B), C++ allows any arbitrary return type, so this is standard compliant. This could be re-assessed if/when we have an actual need for a behavior more akin to that of the C++ STL, for now this PR simply changes a handful of cases which were inconsistent with the rest of the codebase (`void` return type was already the most common case prior to this commit).
2021-11-23Rename `remove()` to `remove_at()` when removing by indexLightning_A
2021-11-17Merge pull request #55042 from nekomatata/fix-segment-intersectionRémi Verschelde
2021-11-17Expose `randfn` to global scopeYuri Roubinsky
2021-11-16Fix segment intersection in Geometry2DPouleyKetchoupp
Doing a multiplication to reduce the amount of tests was causing precision which lead to 2D raycast detecting false positive contacts in some cases with convex polygons.
2021-11-16Rename built-in `SGN()` macro to `SIGN()`Hugo Locurcio
This matches the name of the GDScript function (except it's uppercase here).
2021-11-15Merge pull request #43072 from KoBeWi/point_to_angleRémi Verschelde
2021-11-11Color: Bind `from_hsv` as static methodRémi Verschelde
2021-11-09Merge pull request #53819 from TokageItLab/re-implement-ping-pongRémi Verschelde
Reimplement ping-pong animation and reverse playback
2021-11-09Fix Vector2.angle_to_point() being reversedTomasz Chabora
2021-11-05Rename AABB `get_area` to `get_volume`Brian Semrau
2021-11-04Fix Quaternion multiplication operatorAaron Franke
2021-11-03reimplement ping-pongSilc 'Tokage' Renew
2021-10-28clang-format: Enable `BreakBeforeTernaryOperators`Rémi Verschelde
clang-format keeps breaking the way it handles break *after* ternary operators, so I give up and go with the only style they seem to actually test.
2021-10-28clang-format: Various fixes to comments alignment from `clang-format` 13Rémi Verschelde
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-28clang-format: Disable alignment of operands, too unreliableRémi Verschelde
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-25Refactored Node3D rotation modesreduz
* Made the Basis euler orders indexed via enum. * Node3D has a new rotation_order property to choose Euler rotation order. * Node3D has also a rotation_mode property to choose between Euler, Quaternion and Basis Exposing these modes as well as the order makes Godot a lot friendlier for animators, which can choose the best way to interpolate rotations. The new *Basis* mode makes the (exposed) transform property obsolete, so it was removed (can still be accessed by code of course).
2021-10-25Merge pull request #54050 from reduz/animation-compressionRémi Verschelde
2021-10-21Implement Animation Compressionreduz
Roughly based on https://github.com/godotengine/godot-proposals/issues/3375 (used format is slightly different). * Implement bitwidth based animation compression (see animation.h for format). * Can compress imported animations up to 10 times. * Compression format opens the door to streaming. * Works transparently (happens all inside animation.h)
2021-10-21Remove unimplemented methodsMarcel Admiraal
2021-10-15Swap args of Plane(point, normal) constructormennomax
Now (normal, point)
2021-10-11Revert "Implement reverse playback and ping-pong loop in AnimationPlayer and ↵Juan Linietsky
NodeAnimation"
2021-10-09implement ping-pong loop in animationTokage
Co-authored-by: Chaosus <chaosus89@gmail.com>
2021-10-07Replace references to VisualServer in code comments with RenderingServerHugo Locurcio
VisualServer no longer exists in the `master` branch.
2021-09-30Use range iterators for `Map`Lightning_A
2021-09-30Merge pull request #52544 from JFonS/lod_fixesJuan Linietsky
Auto LOD fixes and improvements
2021-09-29Fix buffer overflow in 2D BVHPouleyKetchoupp
Some areas of code were missed and assumed Vector3.
2021-09-27Auto LOD fixes and improvementsjfons
* Fixed LODs for shadow meshes. * Added a merging step before simplification. This helps with tesselated meshes that were previously left untouched. The angle difference at wich edges ar considered "hard" can be tweaked as an import setting. * LODs will now start with the highest decimation possible and keep doubling (approximately) the number of triangles from there. This makes sure that very low triangle counts are included when possible. * Given more weight to normal preservation. * Modified MeshOptimizer to report distance-based error instead of including attributes in the reported metrics. * Added attribute transference between the original mesh and the various LODs. Right now only normals are taken into account, but it could be expanded to other attributes in the future.
2021-09-24Fix Face3::get_random_point_inside()John Wigg
Use correct overload of Math::random(from, to) to return floating point values within the correct range.
2021-09-24Merge pull request #52430 from AnilBK/vector2-replacementsRémi Verschelde
2021-09-23Construct values only when necessary.Anilforextra
2021-09-21Merge pull request #52878 from AnilBK/add-get-centerRémi Verschelde
2021-09-21Add Get Center Method for Rect2/Rect2i and AABB.Anilforextra
2021-09-20Merge pull request #52398 from deakcor/dev-transformRémi Verschelde
2021-09-19Expose get_skew for transform2d and add new constructorVincent D
Expose set_scale and set_skew for transform2d Replacing float by real_t Adding const parameters Updated transform2d doc
2021-09-17Replace Vector3.to_diagonal_matrix with Basis.from_scaleAaron Franke
2021-09-16Merge pull request #52358 from kleonc/astar_error_messagesRémi Verschelde
`AStar` Add error messages
2021-09-14Clean convex hull decomposition codePouleyKetchoupp
Remove unnecessary conversion between triangle data and vertex data whenever possible.
2021-09-13Revert some URLs from the "Replace HTTP URLs with HTTPS" PRAaron Franke
2021-09-10Merge pull request #52229 from lawnjelly/basis_quat_warningMax Hilbrunner
Improve Basis::get_quaternion error message
2021-09-07Merge pull request #52097 from mortarroad/master-fix-convex-hull-double-edgesMax Hilbrunner
Fix emitting duplicate edges for convex hulls
2021-09-07Use builtin Vector2 functions for calculation of angles.Anilforextra
.