godot/core
Ferenc Arn f271591ac2 Various corrections in 2D math.
This is the follow up for the 2D changes mentioned in PR #6865. It fixes various mistakes regarding the order of matrix indices, order of transformation operations, usage of atan2 function and ensures that the sense of rotation is compatible with a left-handed coordinate system with Y-axis pointing down (which flips the sense of rotations along the z-axis). Also replaced float with real_t, and tried to make use of Matrix32 methods rather than accessing its elements directly.

Affected code in the Godot code base is also fixed in this commit.

The user code using functions involving angles such as atan2, angle_to, get_rotation, set_rotation will need to be updated to conform with the new behavior. Furthermore, the sign of the rotation angles in existing 2D scene files need to be flipped as well.
2017-01-10 10:14:20 -06:00
..
bind -Changed most project settings in the engine, so they have major and minor categories. 2017-01-05 09:16:00 -03:00
helper ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant. 2017-01-02 23:03:46 -03:00
io -Changed most project settings in the engine, so they have major and minor categories. 2017-01-05 09:16:00 -03:00
math Various corrections in 2D math. 2017-01-10 10:14:20 -06:00
os -Changed most project settings in the engine, so they have major and minor categories. 2017-01-05 09:16:00 -03:00
allocators.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
array.cpp Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
array.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
color.cpp Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
color.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
command_queue_mt.cpp Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
command_queue_mt.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
compressed_translation.cpp ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant. 2017-01-02 23:03:46 -03:00
compressed_translation.h ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant. 2017-01-02 23:03:46 -03:00
core_string_names.cpp Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
core_string_names.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
dictionary.cpp Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
dictionary.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
dvector.cpp Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
dvector.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
error_list.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
error_macros.cpp Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
error_macros.h Merge remote-tracking branch 'origin/gles3' into gles3-on-master 2017-01-02 21:52:26 +01:00
event_queue.cpp Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
event_queue.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
func_ref.cpp ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant. 2017-01-02 23:03:46 -03:00
func_ref.h ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant. 2017-01-02 23:03:46 -03:00
global_constants.cpp Begin modifying properties to make them more friendly to script and doc. 2017-01-03 00:38:16 -03:00
global_constants.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
globals.cpp -Changed most project settings in the engine, so they have major and minor categories. 2017-01-05 09:16:00 -03:00
globals.h -Changed most project settings in the engine, so they have major and minor categories. 2017-01-05 09:16:00 -03:00
hash_map.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
hashfuncs.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
hq2x.cpp Fixed HQ2x compiler warnings 2016-07-05 16:52:31 +02:00
hq2x.h Finalized DynamicFont implementation 2016-05-29 11:37:52 -03:00
image.cpp Merge remote-tracking branch 'origin/gles3' into gles3-on-master 2017-01-02 21:52:26 +01:00
image.h Merge remote-tracking branch 'origin/gles3' into gles3-on-master 2017-01-02 21:52:26 +01:00
input_map.cpp -Changed most project settings in the engine, so they have major and minor categories. 2017-01-05 09:16:00 -03:00
input_map.h ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant. 2017-01-02 23:03:46 -03:00
int_types.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
list.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
make_binders.py ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant. 2017-01-02 23:03:46 -03:00
map.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
message_queue.cpp -Changed most project settings in the engine, so they have major and minor categories. 2017-01-05 09:16:00 -03:00
message_queue.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
method_bind.cpp Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
method_bind.h ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant. 2017-01-02 23:03:46 -03:00
method_ptrcall.h Improved binding system (ObjectTypeDB::bind_method) to be friendlier to statically typed languages, should help in the Mono integration. 2016-06-22 23:13:41 -03:00
object_type_db.cpp -GDScript support for accessing properties directly 2017-01-04 17:37:45 -03:00
object_type_db.h -GDScript support for accessing properties directly 2017-01-04 17:37:45 -03:00
object.cpp ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant. 2017-01-02 23:03:46 -03:00
object.h Begin modifying properties to make them more friendly to script and doc. 2017-01-03 00:38:16 -03:00
packed_data_container.cpp ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant. 2017-01-02 23:03:46 -03:00
packed_data_container.h ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant. 2017-01-02 23:03:46 -03:00
pair.h Merge remote-tracking branch 'origin/gles3' into gles3-on-master 2017-01-02 21:52:26 +01:00
path_db.cpp Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
path_db.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
path_remap.cpp -Changed most project settings in the engine, so they have major and minor categories. 2017-01-05 09:16:00 -03:00
path_remap.h ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant. 2017-01-02 23:03:46 -03:00
pool_allocator.cpp Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
pool_allocator.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
print_string.cpp Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
print_string.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
profile_clock.cpp First version of Profiler 2016-05-21 21:18:16 -03:00
profile_clock.h First version of Profiler 2016-05-21 21:18:16 -03:00
ref_ptr.cpp Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
ref_ptr.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
reference.cpp ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant. 2017-01-02 23:03:46 -03:00
reference.h ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant. 2017-01-02 23:03:46 -03:00
register_core_types.cpp -Changed most project settings in the engine, so they have major and minor categories. 2017-01-05 09:16:00 -03:00
register_core_types.h -Changed most project settings in the engine, so they have major and minor categories. 2017-01-05 09:16:00 -03:00
resource.cpp -Conversion of most properties to a simpler syntax, easier to use by script 2017-01-04 01:16:14 -03:00
resource.h ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant. 2017-01-02 23:03:46 -03:00
rid.cpp Merge remote-tracking branch 'origin/gles3' into gles3-on-master 2017-01-02 21:52:26 +01:00
rid.h Merge remote-tracking branch 'origin/gles3' into gles3-on-master 2017-01-02 21:52:26 +01:00
ring_buffer.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
safe_refcount.cpp Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
safe_refcount.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
script_debugger_local.cpp Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
script_debugger_local.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
script_debugger_remote.cpp -Changed most project settings in the engine, so they have major and minor categories. 2017-01-05 09:16:00 -03:00
script_debugger_remote.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
script_language.cpp ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant. 2017-01-02 23:03:46 -03:00
script_language.h ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant. 2017-01-02 23:03:46 -03:00
SCsub -Changed most project settings in the engine, so they have major and minor categories. 2017-01-05 09:16:00 -03:00
self_list.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
set.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
simple_type.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
sort.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
string_db.cpp Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
string_db.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
translation.cpp -Changed most project settings in the engine, so they have major and minor categories. 2017-01-05 09:16:00 -03:00
translation.h ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant. 2017-01-02 23:03:46 -03:00
typedefs.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
ucaps.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
undo_redo.cpp -Changed most project settings in the engine, so they have major and minor categories. 2017-01-05 09:16:00 -03:00
undo_redo.h -Changed most project settings in the engine, so they have major and minor categories. 2017-01-05 09:16:00 -03:00
ustring.cpp Merge remote-tracking branch 'origin/gles3' into gles3-on-master 2017-01-02 21:52:26 +01:00
ustring.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
variant_call.cpp Merge remote-tracking branch 'origin/gles3' into gles3-on-master 2017-01-02 21:52:26 +01:00
variant_construct_string.cpp Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
variant_op.cpp Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
variant_parser.cpp Merge remote-tracking branch 'origin/gles3' into gles3-on-master 2017-01-02 21:52:26 +01:00
variant_parser.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
variant.cpp ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant. 2017-01-02 23:03:46 -03:00
variant.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
vector.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
vmap.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
vset.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00