Commit graph

457 commits

Author SHA1 Message Date
nathanwfranke
e5cb557b73 Fix bug where Control at origin with 0 size not rendered
Make a new method instead to make the code more elegant


Move Function down a bit
2020-02-07 14:43:27 -06:00
Hugo Locurcio
a002b93d86
Add explanations for errors related to Vector/Quat normalization 2020-01-24 14:19:23 +01:00
lawnjelly
eaf8e5ce52 Change CameraMatrix::get_viewport_size to get_viewport_half_extents
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-22 18:22:00 +00:00
Rémi Verschelde
a7f49ac9a1 Update copyright statements to 2020
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.
2020-01-01 11:16:22 +01:00
Danil Alexeev
134755ebcf Add ord() function to Expression class
The ord() function was recently added in GDScript and VisualScript,
but was missed in the Expression class.
2019-12-29 09:20:10 +03:00
Rémi Verschelde
f111d1aaed Drop b2d_convexdecomp. no longer necessary.
We now use `thirdparty/misc/triangulator.h` for all physics-related
(collision, navigation) triangulation needs.

Follow-up to #34293.
2019-12-13 23:29:52 +01:00
Rémi Verschelde
2845e6a21a
Merge pull request #34040 from qarmin/unused_variable_more_precise_numbers
Removed unused variables, add some constants numbers
2019-12-10 08:25:31 +01:00
Rafał Mikrut
ed1c4bc77d Removed unused variables, add some constants numbers 2019-12-10 05:13:02 +01:00
Andrii Doroshenko (Xrayez)
749d917424 Fix severe performance drop while deflating polylines
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-12-03 15:43:59 +02:00
Rémi Verschelde
083d088de3
Merge pull request #33583 from qarmin/fix_overflows_unitialized
Fix some overflows and unitialized variables
2019-11-20 21:31:12 +01:00
Rafał Mikrut
99d8626f4a Fix some overflows and unitialized variables 2019-11-20 16:22:16 +01:00
stoofin
8abd64dcbb
Fixed bug caused by a copy/paste error in Face3::get_closest_point_to
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-19 22:30:28 -08:00
Shiqing
aac7ddf89f Emit an error rather than crash in A* 2019-11-08 20:32:50 +08:00
Rémi Verschelde
77816fea8b
Merge pull request #32477 from aaronfranke/equal-approx-separate
Make is_equal_approx separate and make == exact again
2019-11-07 14:54:15 +01:00
Rémi Verschelde
ed373a60b1
Merge pull request #30556 from kawa-yoiko/astar-directed
Improve support for directed graphs in A*; docs update included
2019-11-07 12:33:27 +01:00
Aaron Franke
8754e21f48
Fix "seperate" typos 2019-10-31 08:52:26 -04:00
Aaron Franke
218f38c7ec
Expose is_equal_approx and restore == to be exact again
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-14 16:48:59 -04:00
Aaron Franke
aeb7075628
Replace vector == and is_zero_approx(distance) with is_equal_approx
Internal changes only
2019-10-14 16:47:42 -04:00
Aaron Franke
86922ff70b
Make is_equal_approx separate for structures
This commit adds exposed behavior for C#
2019-10-14 16:46:54 -04:00
Aaron Franke
643874f8ca
[Mono] Change Plane intersect methods to return nullable Vector3 2019-10-08 22:47:22 -04:00
Rémi Verschelde
106e21fd5f
Merge pull request #32478 from AlexHolly/fix-rect2-encloses
Make Rect2.encloses return true on same size
2019-10-08 16:21:45 +02:00
Marcel Admiraal
c2aa3e2351 Remove circular include between core/typedefs.h and core/error_macros.h 2019-10-08 11:03:57 +02:00
Marcel Admiraal
40197685bb Remove circular dependency between Vector3 and Basis. 2019-10-07 16:26:27 +02:00
Alexander Holland
a681c90009 Make Rect2.encloses return true on same size 2019-10-02 03:27:48 +02:00
Shiqing
c2b824687d Reduce memory usage for edges in A* and add tests 2019-09-28 16:17:52 +08:00
Rémi Verschelde
7a67ae01a4
Merge pull request #32249 from hbina/a_star_ignore_disabled
Add option to consider disable points
2019-09-27 22:41:49 +02:00
Hanif Bin Ariffin
7b3790d2cc Add option to consider disable points
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-27 11:24:59 -04:00
Rémi Verschelde
dec10dd776
Merge pull request #32051 from qarmin/some_error_explanation
Added some obvious errors explanations
2019-09-25 11:51:54 +02:00
qarmin
17732fe698 Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
Rémi Verschelde
823c3def72 Fix copyright headers and style issues 2019-09-24 11:52:06 +02:00
Rémi Verschelde
159470df08
Merge pull request #32275 from godotengine/skin_support
Added skin support and simplified APIs to override bone position + glTF 2.0 import fixes
2019-09-23 15:02:15 +02:00
qarmin
50be65bf43 Changed some code found by Clang Tidy and Coverity 2019-09-22 18:45:08 +02:00
Marios Staikopoulos
11e09e59d1 GLTF2 Import Fixes - Skin(s) to Skeleton - Skin Support 2019-09-20 23:08:58 -07:00
Shiqing
98136418ac Improve support for directed graphs in AStar 2019-09-11 15:41:14 +08:00
Rémi Verschelde
726711d8c5
Merge pull request #31756 from raphael10241024/fast_aabb_transform
a faster function to transform aabb
2019-09-03 12:26:43 +02:00
Aaron Franke
f8b4cf0fc4
Check for exact equality before approximate equality 2019-09-01 14:02:14 -04:00
Andrii Doroshenko (Xrayez)
08272585e9 Remove redundant transform method in Geometry singleton
Transform2D's xform method can be used instead which handles
`PoolVector2Array` now (as well as 3D version).
2019-09-01 14:34:51 +03:00
Rémi Verschelde
c693b5a5bd
Merge pull request #31761 from Xrayez/trans2d-vector2array
Add transform methods for PoolVector*Array
2019-09-01 13:07:25 +02:00
Rémi Verschelde
69de1eca01
Merge pull request #31667 from YeldhamDev/geometry_point_circle_cleanup
Add 'is_point_in_circle()' to Geometry class, and general file cleanup
2019-09-01 12:59:49 +02:00
Andrii Doroshenko (Xrayez)
07cff56f48 Add transform methods for PoolVector*Array
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-29 14:47:33 +03:00
RaphaelHunter
e7febd72d6 a faster funtion to transform aabb 2019-08-29 14:17:08 +08:00
Aaron Franke
34ab6549b1
[Mono] Various Color improvements
I also slid in a fix to C++ Vector3 > and >=
2019-08-27 22:05:18 -04:00
Michael Alexsander Silva Dias
6cc54a5864 Add 'is_point_in_circle()' to Geometry class, and general file cleanup 2019-08-27 18:01:05 -03:00
Robin Hübner
1031833fb0
allow to reserve space in OAHashMap explicitly and also in AStar.
* also handle overflow occurring in _get_probe_length
2019-08-27 00:38:35 +02:00
Rémi Verschelde
51d50e167d
Merge pull request #31094 from aaronfranke/vector-sign-mod-etc
Add Vector2/3 sign and posmod functions, axis, docs, misc additions
2019-08-23 09:07:47 +02:00
Rémi Verschelde
99980d856b
Merge pull request #29871 from Faless/crypto/initial_pr
More Crypto, SSL server, crt/key as Resource, HashingContext
2019-08-21 18:03:03 +02:00
Rémi Verschelde
05a4310899
Merge pull request #31402 from profan/perf/astar-improvements
A* performance improvements, use OAHashMap.
2019-08-21 11:27:12 +02:00
Robin Hübner
4bac393549
astar performance improvements, use oahashmap 2019-08-21 08:47:55 +02:00
Rémi Verschelde
a8db4c848d
Merge pull request #31395 from ptrojahn/floatsarenasty
Replace is_zero_approx(A.distance_to(B)) with A==B
2019-08-20 12:54:40 +02:00
Paul Trojahn
7c9c6df7e4 Replace is_zero_approx(A.distance_to(B)) with A==B
Related to #22988 (Fixes the holes in the shape of
the first comment)
2019-08-19 18:16:58 +02:00