aboutsummaryrefslogtreecommitdiff
path: root/core/math
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #19193 from tagcup/quat_normJuan Linietsky2018-06-255-15/+37
|\ | | | | Fixed Basis -> Quat conversions, added a few safety checks.
| * Fixed Basis -> Quat conversions, added a few safety checks.tagcup2018-05-275-15/+37
| | | | | | | | Fixes #19027.
* | Added auto triangle generation in blend space, using Delaunay.Juan Linietsky2018-06-212-0/+146
| |
* | Polished 3D selectionJFonS2018-06-133-0/+238
| |
* | Added functions to get trimesh infoAndrea Catania2018-06-072-0/+24
| |
* | Style: Apply clang-format (5.0) to some missed filesRémi Verschelde2018-05-311-1/+1
|/
* Add SLERP to Vector{2,3}, optimize Quat's Vector3 rotation.tagcup2018-05-126-9/+65
| | | | Also even out Basis and Quat APIs a little.
* Merge pull request #15943 from poke1024/geometry-line-lineJuan Linietsky2018-05-071-0/+15
|\ | | | | Add Geometry::line_intersects_line_2d()
| * Add Geometry::line_intersects_line_2d()Bernhard Liebl2018-01-211-0/+15
| |
* | Vector3::round, Vector2::round & Vector2::ceil methods were added.Alexander Alekseev2018-05-043-0/+18
| | | | | | | | | | Now both structs (Vector2 & Vector3) have round, floor & ceil methods. (see #18603)
* | Fix Coverity reports of uninitialized scalar variableRémi Verschelde2018-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | Fixes most current reports on Coverity Scan of uninitialized scalar variable (CWE-457): https://cwe.mitre.org/data/definitions/457.html These happen most of the time (in our code) when instanciating structs without a constructor (or with an incomplete one), and later returning the instance. This is sometimes intended though, as some parameters are only used in some situations and should not be double-initialized for performance reasons (e.g. `constant` in ShaderLanguage::Token).
* | Avoid converting Quat to Euler angles when not necessary.tagcup2018-04-143-5/+77
| | | | | | | | | | | | | | | | Also ensure that get_scale doesn't arbitrarlity change the signs of scales, ensuring that the combination of get_rotation and get_scale gives the correct basis. Added various missing functions and constructors. Should close #17968.
* | Small performance fix to wrapfChaosus2018-04-131-2/+2
| |
* | Resolves Inccorect Quaternion ConversionCrazy-P2018-04-091-1/+1
| | | | | | | | Fixes https://github.com/godotengine/godot/issues/18025
* | Merge pull request #16495 from Chaosus/is_point_in_triangle_fixJuan Linietsky2018-04-081-7/+6
|\ \ | | | | | | Fix is_point_in_triangle function
| * | Fix is_point_in_triangleChaosus2018-02-081-7/+6
| | |
* | | Fix for clang warning at distance_toMarcelo Fernandez2018-03-221-1/+1
| | |
* | | Merge pull request #17254 from Chaosus/updatewrapRémi Verschelde2018-03-132-17/+12
|\ \ \ | | | | | | | | Update wrap functions
| * | | Update wrap functionsChaosus2018-03-062-17/+12
| | | |
* | | | Bring back Vector2.cross()Bernhard Liebl2018-03-072-6/+0
|/ / /
* / / Allow degenerate triangles in polygon triangulation when necessary.Nicolas Silva2018-02-282-10/+37
|/ /
* / Fix polygon triangulation failure.Nicolas Silva2018-02-051-1/+1
|/ | | | | | The ear clipping algorithm used to triangulate polygons has a slightly too conservative point-in-triangle test which can, in some configurations prevent it from finding a possible tessellation. Relaxing the test by considering that points exactly on edges don't belong the triangle fixes the issue. Changing the semantic of the test is safe because no other code makes use of it. A more detailed explanation can be found in issue #16395. Fixes #16395.
* Fix typos in code and docs with codespellRémi Verschelde2018-01-181-1/+1
| | | | Using v1.11.0 from https://github.com/lucasdemarchi/codespell
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-0534-0/+34
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Merge pull request #15093 from poke1024/canvas-editor-selectRémi Verschelde2018-01-032-0/+14
|\ | | | | More exact picking for canvas editor
| * More exact picking for canvas editorBernhard Liebl2017-12-272-0/+14
| |
* | Merge pull request #15083 from tagcup/spatial_rot_fixJuan Linietsky2018-01-022-2/+18
|\ \ | | | | | | Restore the behavior of Spatial rotations recently changed in c1153f5.
| * | Restore the behavior of Spatial rotations recently changed in c1153f5.tagcup2017-12-272-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That change was borne out of a confusion regarding the meaning of "local" in #14569. Affine transformations in Spatial simply correspond to affine operations of its Transform. Such operations take place in a coordinate system that is defined by the parent Spatial. When there is no parent, they correspond to operations in the global coordinate system. This coordinate system, which is relative to the parent, has been referred to as the local coordinate system in the docs so far, but this sloppy language has apparently confused some users, making them think that the local coordinate system refers to the one whose axes are "painted" on the Spatial node itself. To avoid such conceptual conflations and misunderstandings in the future, the parent-relative local system is now referred to as "parent-local", and the object-relative local system is called "object-local" in the docs. This commit adds the functionality "requested" in #14569, not by changing how rotate/scale/translate works, but by adding new rotate_object_local, scale_object_local and translate_object_local functions. Also, for completeness, there is now global_scale. This commit also updates another part of the docs regarding the rotation property of Spatial, which also leads to confusion among some users.
* | | Update copyright statements to 2018Rémi Verschelde2018-01-0136-72/+72
| | | | | | | | | | | | Happy new year to the wonderful Godot community!
* | | Merge pull request #15091 from poke1024/fix-rect2-distance-toNoshyaar2018-01-011-6/+15
|\ \ \ | | | | | | | | Fix Rect2::distance_to() not returning 0
| * | | Fix Rect2::distance_to() not returning 0Bernhard Liebl2017-12-271-6/+15
| | | |
* | | | Merge pull request #15045 from poke1024/vector2-inlineNoshyaar2017-12-272-63/+64
|\ \ \ \ | |_|/ / |/| | | Inline some very common Vector2 operations
| * | | Inline some very common Vector2 operationsBernhard Liebl2017-12-252-63/+64
| | |/ | |/|
* | | Change the rotate function of Spatial to be local, makes more sense. Closes ↵Juan Linietsky2017-12-262-0/+12
| |/ |/| | | | | #14569
* | Add missing parameter namesPoommetee Ketson2017-12-251-1/+1
| |
* | Fixes grow_margin not working at allGilles Roudiere2017-12-211-1/+2
|/
* Fix wrong return value in some virtual method bindingsRémi Verschelde2017-12-101-2/+2
|
* Merge pull request #13347 from Noshyaar/hang_in_thereRémi Verschelde2017-12-092-29/+5
|\ | | | | Rect2: add function returning same rect with positive w and h
| * Rect2: add function returning same rect with positive w and hPoommetee Ketson2017-11-282-29/+5
| |
* | Style: Apply new clang-format 5.0 style to all filesRémi Verschelde2017-12-078-40/+39
| |
* | Style: Apply clang-format again on all filesRémi Verschelde2017-12-072-3/+1
| | | | | | | | | | Fixes issues introduced by newer clang-format versions or commits pushed directly without using the clang-format pre-commit hook.
* | Forgot to apply oversampling to YBastiaan Olij2017-12-031-0/+1
|/
* Rename Rect3 to AABB.Ferenc Arn2017-11-1715-106/+106
| | | | Fixes #12973.
* Add support for the TAU constant. Fixes #12094.Goutte2017-11-121-0/+1
|
* Remove get_default_video_mode definition on OSX/iOSRémi Verschelde2017-11-091-1/+1
| | | | | | | | It had been missed in d09160a8b67fdc60e8108962c4e9bd4c0bc7f13e and broke compilation for those platforms. Took the opportunity to run clang-format on the code base to fix some corner cases that went through our static tests/were overlooked recently.
* AStar: implementation of get_point_connectionsDmDerbin2017-11-042-0/+18
|
* Merge pull request #12035 from Chaosus/wrapfuncRémi Verschelde2017-10-312-1/+19
|\ | | | | Added new Wrap functions for numbers
| * Added new wrap functionsChaosus2017-10-132-1/+19
| |
* | Merge pull request #11249 from m4nu3lf/bugfix/get_eulerRémi Verschelde2017-10-311-13/+12
|\ \ | | | | | | Fix inertia tensor update & Generic6DOFJoint & Simplify Basis::get_euler()
| * | Fix Basis::get_euler_xyz()m4nu3lf2017-09-221-13/+12
| | |