summaryrefslogtreecommitdiff
path: root/core/math
AgeCommit message (Collapse)Author
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-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.
2019-04-01Some improvements to is_equal_approx, restored Quat operator.Juan Linietsky
2019-04-01Add object encoding param to serialization methodsFabio Alessandrelli
Network peers get_var/put_var File get_var/store_var GDScript/Mono/VisualScript bytes2var/var2bytes Add MultiplayerAPI.allow_object_decoding member which deprecates PacketPeer.allow_object_decoding. Break ABI compatibaility (API compatibility for GDNative).
2019-03-27Properly setup seed in RNGChaosus
2019-03-21Add missing methods to Rect2ilupoDharkael
Replace inline with _FORCE_INLINE_ in short methods. Remove unused and redundant method no_area() as we already have has_no_area(). Add grow_individual() grow_margin() and expand() to Rect2i.
2019-03-17Added normally distributed generation function to RNGChaosus
2019-03-16Merge pull request #25495 from IronicallySerious/fix-expand-macrosRémi Verschelde
Fix parameterised macros in core. Addresses #25488
2019-03-07Fix -Wc++11-extensions warning after #26737Rémi Verschelde
Fixes #26769.
2019-03-07Fixed get_seed() not returning the correct seed.MidZik
2019-03-06Fixes Geometry.segment_intersects_circle working only one way.Christoph Schroeder
2019-03-04TileSet/TileMap: Decompose solid non-convex polygons into convexes. Real fix ↵Mariano Suligoy
for #24003
2019-03-02Fix new GCC 9 warnings: -Wdeprecated-copy.marxin
2019-03-01Scale quickhull tolerance with mesh sizeHein-Pieter van Braam
Taken from three.js's implementation. Tested with a wide variety of meshes.
2019-02-26Remove setting that caused is_inside_tree() errors on doppler tracking enabled.Juan Linietsky
2019-02-25Several fixes to make GLES2 on HTML5 work much better.Juan Linietsky
Changed math class error reporting to be a bit less paranoid.
2019-02-25Fix wrapi to use int64_t instead intChaosus
2019-02-23Fix crash when using `wrapi()` with a range of zeroHugo Locurcio
`wrapi()` and `wrapf()` will now return the value of the `min` parameter if the range is equal to zero.
2019-02-20Add -Wshadow=local to warnings and fix reported issues.marxin
Fixes #25316.
2019-02-20fixed AStar improper point deletion (leads to crash)hedin
2019-02-19Add FRUSTUM camera mode, allowing tilted frustumsJFonS
This new camera mode makes it easy to create tilted frustums for mirror or portal effects. This work was kindly sponsored by IMVU.
2019-02-18Fix parameterised macros in core. Addresses #25488IronicallySerious
This adds the saves the programmer of doing something like SWAP(x++, y--) and getting the wrong result unless the parameters are evaluated before use.
2019-02-16Merge pull request #25680 from Chaosus/random_fixRémi Verschelde
Fix random generation, to not always retrieve 0 after seed()
2019-02-16Fix typo for randd and randfPierrick Brunet
* And improve documentation according to issue #25938
2019-02-13Merge pull request #25821 from akien-mga/sync-class-and-filenamesRémi Verschelde
Ensure classes match their header filename