summaryrefslogtreecommitdiff
path: root/core/math
AgeCommit message (Collapse)Author
2019-07-06Added release function to PoolVector::Access.Ibrahn Sahir
For clarity, assign-to-release idiom for PoolVector::Read/Write replaced with a function call. Existing uses replaced (or removed if already handled by scope)
2019-07-03Add b64 to string helper in CryptoCoreFabio Alessandrelli
2019-07-03SCons: Use CPPDEFINES instead of CPPFLAGS for pre-processor definesRémi Verschelde
It's the recommended way to set those, and is more portable (automatically prepends -D for GCC/Clang and /D for MSVC). We still use CPPFLAGS for some pre-processor flags which are not defines.
2019-07-02CryptoCore class to access to base crypto utils.Fabio Alessandrelli
Godot core needs MD5/SHA256/AES/Base64 which used to be provided by separate libraries. Since we bundle mbedtls in most cases, and we can easily only include the needed sources if we so desire, let's use it. To simplify library changes in the future, and better isolate header dependencies all functions have been wrapped around inside a class in `core/math/crypto_base.h`. If the mbedtls module is disabled, we only bundle the needed source files independently of the `builtin_mbedtls` option. If the module is enabled, the `builtin_mbedtls` option works as usual. Also remove some unused headers from StreamPeerMbedTLS which were causing build issues.
2019-07-01Merge pull request #30126 from qarmin/remove_unnecessary_codeRémi Verschelde
Remove unnecessary code and add some error explanations
2019-07-01Remove unnecessary code and add some error explanationsqarmin
2019-06-29Merge pull request #30112 from AgentEnder/masterRémi Verschelde
AStar get_current_point enabled consideration
2019-06-29AStar get_closest_point/get_closest_position_in_segment enabled considerationCraigory V Coppola
2019-06-26Some code changed with Clang-Tidyqarmin
2019-06-19Made use of semicolons more consitent, fixed formattingJohnJLight
2019-06-19Merge pull request #27237 from Chaosus/astar_2dRémi Verschelde
Added 2D functions to AStar
2019-06-18Fix AStar set/is_point_disabled crashChaosus
2019-06-13Merge pull request #29488 from Daw11/astar-remove-nodeRémi Verschelde
Fix the performance of remove_point of AStar
2019-06-12Merge pull request #29702 from KoBeWi/fix_random_crashRémi Verschelde
Validate parameters of randi_range()
2019-06-12Validate parameters of randi_range()Tomasz Chabora
2019-06-12Merge pull request #27193 from toasteater/fix/pcg-randfRémi Verschelde
Improved uniformity of RandomPCG::randf.
2019-06-07Fix Vector3 slerp method normalizing cross productToshiwo
2019-06-04Save inside the Points of AStar the neighbours that aren't connectedDaw11
Improve the performance of remove_point because it doesn't have to search every neighbour of every node
2019-06-01Merge pull request #27789 from Giacom/move_towardsRémi Verschelde
Added move_toward functions for float, Vector2 and Vector3
2019-05-30Added 2D functions to AStarChaosus
2019-05-28Added move_toward functions for float, Vector2 and Vector3Giacom
2019-05-27Merge pull request #28957 from aaronfranke/basis-optimizeRémi Verschelde
Optimize Basis constructor for Axis Angle
2019-05-24Expose 2D Delaunay triangulation in Geometry singletonAndrii Doroshenko (Xrayez)
Can be used via scripting as `Geometry.triangulate_delaunay_2d(points)` The interface is the same as in `Triangulate` library, returning indices into triangulated points.
2019-05-22Expose 2D polygon boolean operations in Geometry singletonAndrii Doroshenko (Xrayez)
Clipper 6.4.2 is used internally to perform polypaths clipping, as well as inflating/deflating polypaths. The following methods were added: ``` Geometry.merge_polygons_2d(poly_a, poly_b) # union Geometry.clip_polygons_2d(poly_a, poly_b) # difference Geometry.intersect_polygons_2d(poly_a, poly_b) # intersection Geometry.exclude_polygons_2d(poly_a, poly_b) # xor Geometry.clip_polyline_with_polygon_2d(poly_a, poly_b) Geometry.intersect_polyline_with_polygon_2d(poly_a, poly_b) Geometry.offset_polygon_2d(polygon, delta) # inflate/deflate Geometry.offset_polyline_2d(polyline, delta) # returns polygons // This one helps to implement CSG-like behaviour: Geometry.transform_points_2d(points, transform) ``` All the methods return an array of polygons/polylines. The resulting polygons could possibly be holes which could be checked with `Geometry.is_polygon_clockwise()` which was exposed to scripting as well.
2019-05-19Fix typos with codespellRémi Verschelde
Using codespell 1.15.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear doubleclick leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
2019-05-18Merge pull request #28925 from Daw11/astar-sorted-arrayMax Hilbrunner
Improve the performance of AStar
2019-05-17Optimize Basis constructor for Axis AngleAaron Franke
2019-05-16Use a binary heap for the open list of AstarDaw11
2019-05-05Implement Lanczos image filterDaw11
2019-05-01Merge pull request #27676 from qarmin/small_fixes_2Rémi Verschelde
Small fixes to static analyzer bugs
2019-04-30Make "decimal" functions more consistentAaron Franke
In GDScript, rename "decimals" to "step_decimals". In C#, add "StepDecimals", but keep the old functionality in a method called "DecimalCount".
2019-04-30Merge pull request #27294 from lupoDharkael/rect2iRémi Verschelde
Add missing methods to Rect2i
2019-04-25Use approximate equallity methods in many placesAaron Franke
2019-04-25[Core] Approximate equalityAaron Franke
2019-04-23Merge pull request #26064 from JFonS/add_frustum_camera_modeHein-Pieter van Braam
Add FRUSTUM camera mode, allowing tilted frustums
2019-04-19Added ability for multiple images to be imported as an atlasJuan Linietsky
This adds support for groups in the import system, which point to a single file. Add property hint for saving files in file field
2019-04-10Added generator audio stream, and spectrum analyzer audio effectJuan Linietsky
Made AudioFrame and Vector2 equivalent for casting. Added ability to obtain the playback object from stream players. Added ability to obtain effect instance from audio server.
2019-04-09Style: Apply new changes from clang-format 8.0Rémi Verschelde
It seems to stay compatible with formatting done by clang-format 6.0 and 7.0, so contributors can keep using those versions for now (they will not undo those changes).
2019-04-08Merge pull request #27506 from Chaosus/astarRémi Verschelde
Added functions to AStar for disable/enable points to effectivly create obstacles
2019-04-08Merge pull request #27452 from Chaosus/direction_toRémi Verschelde
Added method to retrieve a direction vector from one point to another
2019-04-08Merge pull request #27231 from Chaosus/smoothstepRémi Verschelde
Added smoothstep built-in function
2019-04-08Added functions to AStar for disable/enable pointsChaosus
2019-04-07Added smoothstep built-in functionChaosus
2019-04-07Merge pull request #27043 from Chaosus/randfnYuri Roubinsky
Added gaussian distribution function to RNG
2019-04-06Merge pull request #26486 from marxin/fix-Wdeprecated-copyRémi Verschelde
Fix new GCC 9 warnings: -Wdeprecated-copy.
2019-04-06Merge pull request #26699 from Schroedi/fix-line-circle-intersectRémi Verschelde
Fixes Geometry.segment_intersects_circle working only one way.
2019-04-05Added direction_to method to vectorsChaosus
2019-04-04Small fixes to static analyzer bugsqarmin
2019-04-01Merge pull request #27171 from Chaosus/randfixRémi Verschelde
Properly setup seed in RNG
2019-04-01Merge pull request #27485 from Faless/io/encode_decode_safety_prRémi Verschelde
Safer encode/decode variant.