summaryrefslogtreecommitdiff
path: root/core/math
AgeCommit message (Collapse)Author
2020-02-08Merge pull request #35682 from nathanwfranke/canvas-cull-control-fixRémi Verschelde
Fix bug where canvas culls things at origin with size 0
2020-02-07Fix bug where Control at origin with 0 size not renderednathanwfranke
Make a new method instead to make the code more elegant Move Function down a bit
2020-02-05Add do..while(0) wrappers to macros without one.Marcel Admiraal
- Add do..while(0) wrapper to ERR_FAIL_NULL macros. - Add do..while(0) wrapper to ERR_FAIL_COND macros. - Add do..while(0) wrapper to ERR_CONTINUE macros. - Add do..while(0) wrapper to ERR_BREAK macros. - Add do..while(0) wrapper to CRASH_COND macros. - Add do..while(0) wrapper to ERR_FAIL macros. - Add do..while(0) wrapper to ERR_PRINT macros. - Add do..while(0) wrapper to WARN_PRINT macros. - Add do..while(0) wrapper to WARN_DEPRECATED macros. - Add do..while(0) wrapper to CRASH_NOW macros.
2020-01-24Add explanations for errors related to Vector/Quat normalizationHugo Locurcio
2020-01-22Change CameraMatrix::get_viewport_size to get_viewport_half_extentslawnjelly
Fixes #26637. Fixes #19900. The viewport_size returned by get_viewport_size was previously incorrect, being half the correct value. The function is renamed to get_viewport_half_extents, and now returns a Vector2. Code which called this function has also been modified accordingly. This PR also fixes shadow culling when using ortho cameras, because the correct input for CameraMatrix::set_orthogonal should be the full HEIGHT from get_viewport_half_extents, and not half the width. It also fixes state.ubo_data.viewport_size in rasterizer_scene_gles3.cpp to be the width and the height of the viewport in pixels as stated in the documentation, rather than the current value which is half the viewport extents in worldspace, presumed to be a bug.
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-12-29Add ord() function to Expression classDanil Alexeev
The ord() function was recently added in GDScript and VisualScript, but was missed in the Expression class.
2019-12-13Drop b2d_convexdecomp. no longer necessary.Rémi Verschelde
We now use `thirdparty/misc/triangulator.h` for all physics-related (collision, navigation) triangulation needs. Follow-up to #34293.
2019-12-10Merge pull request #34040 from qarmin/unused_variable_more_precise_numbersRémi Verschelde
Removed unused variables, add some constants numbers
2019-12-10Removed unused variables, add some constants numbersRafał Mikrut
2019-12-03Fix severe performance drop while deflating polylinesAndrii Doroshenko (Xrayez)
Underscaled arc tolerance produced very small values so that changes to this parameter were negligible when scaled internally, hence significant performance drop (lots of intermediate points inserted in an arc). Now the performance is mostly the same compared to other types of offsetting (SQUARE, MITER).
2019-11-20Merge pull request #33583 from qarmin/fix_overflows_unitializedRémi Verschelde
Fix some overflows and unitialized variables
2019-11-20Fix some overflows and unitialized variablesRafał Mikrut
2019-11-19Fixed bug caused by a copy/paste error in Face3::get_closest_point_tostoofin
s * edge0 = -d / a * edge0 = -edge0⋅v0 / (edge0⋅edge0) * edge0 = vector projection of -v0 onto edge0 By incorrectly using -e/c instead of -d/a, Face3::get_closest_point_to was returning the wrong point in certain cases. Specifically, I noticed it returning vertex[0] when it should have been returning vertex[1].
2019-11-08Emit an error rather than crash in A*Shiqing
2019-11-07Merge pull request #32477 from aaronfranke/equal-approx-separateRémi Verschelde
Make is_equal_approx separate and make == exact again
2019-11-07Merge pull request #30556 from kawa-yoiko/astar-directedRémi Verschelde
Improve support for directed graphs in A*; docs update included
2019-10-31Fix "seperate" typosAaron Franke
2019-10-14Expose is_equal_approx and restore == to be exact againAaron Franke
This commit changes behavior for GDScript and C#. Also did some organizing of the order to logically group related methods, mostly for Rect2 and AABB.
2019-10-14Replace vector == and is_zero_approx(distance) with is_equal_approxAaron Franke
Internal changes only
2019-10-14Make is_equal_approx separate for structuresAaron Franke
This commit adds exposed behavior for C#
2019-10-08[Mono] Change Plane intersect methods to return nullable Vector3Aaron Franke
2019-10-08Merge pull request #32478 from AlexHolly/fix-rect2-enclosesRémi Verschelde
Make Rect2.encloses return true on same size
2019-10-08Remove circular include between core/typedefs.h and core/error_macros.hMarcel Admiraal
2019-10-07Remove circular dependency between Vector3 and Basis.Marcel Admiraal
2019-10-02Make Rect2.encloses return true on same sizeAlexander Holland
2019-09-28Reduce memory usage for edges in A* and add testsShiqing
2019-09-27Merge pull request #32249 from hbina/a_star_ignore_disabledRémi Verschelde
Add option to consider disable points
2019-09-27Add option to consider disable pointsHanif Bin Ariffin
Previously, disabled points will not be considered when performing get_closest_point. This commit changes that by introducing an additional flag for this behavior. Related issue: #31814
2019-09-25Merge pull request #32051 from qarmin/some_error_explanationRémi Verschelde
Added some obvious errors explanations
2019-09-25Added some obvious errors explanationsqarmin
2019-09-24Fix copyright headers and style issuesRémi Verschelde
2019-09-23Merge pull request #32275 from godotengine/skin_supportRémi Verschelde
Added skin support and simplified APIs to override bone position + glTF 2.0 import fixes
2019-09-22Changed some code found by Clang Tidy and Coverityqarmin
2019-09-20GLTF2 Import Fixes - Skin(s) to Skeleton - Skin SupportMarios Staikopoulos
2019-09-11Improve support for directed graphs in AStarShiqing
2019-09-03Merge pull request #31756 from raphael10241024/fast_aabb_transformRémi Verschelde
a faster function to transform aabb
2019-09-01Check for exact equality before approximate equalityAaron Franke
2019-09-01Remove redundant transform method in Geometry singletonAndrii Doroshenko (Xrayez)
Transform2D's xform method can be used instead which handles `PoolVector2Array` now (as well as 3D version).
2019-09-01Merge pull request #31761 from Xrayez/trans2d-vector2arrayRémi Verschelde
Add transform methods for PoolVector*Array
2019-09-01Merge pull request #31667 from YeldhamDev/geometry_point_circle_cleanupRémi Verschelde
Add 'is_point_in_circle()' to Geometry class, and general file cleanup
2019-08-29Add transform methods for PoolVector*ArrayAndrii Doroshenko (Xrayez)
Similarly to `Vector2` and `Rect2` transforms in 2D and Vector3, Plane, and AABB in 3D. PoolVector2Array and PoolVector3Array were the only missing Variant types in both Transform2D and Transform respectively.
2019-08-29a faster funtion to transform aabbRaphaelHunter
2019-08-27[Mono] Various Color improvementsAaron Franke
I also slid in a fix to C++ Vector3 > and >=
2019-08-27Add 'is_point_in_circle()' to Geometry class, and general file cleanupMichael Alexsander Silva Dias
2019-08-27allow to reserve space in OAHashMap explicitly and also in AStar.Robin Hübner
* also handle overflow occurring in _get_probe_length
2019-08-23Merge pull request #31094 from aaronfranke/vector-sign-mod-etcRémi Verschelde
Add Vector2/3 sign and posmod functions, axis, docs, misc additions
2019-08-21Merge pull request #29871 from Faless/crypto/initial_prRémi Verschelde
More Crypto, SSL server, crt/key as Resource, HashingContext
2019-08-21Merge pull request #31402 from profan/perf/astar-improvementsRémi Verschelde
A* performance improvements, use OAHashMap.
2019-08-21astar performance improvements, use oahashmapRobin Hübner