dragonfire-engine-teran/builtin
NetherEran 7148834440
Some vector functions useful for working with rotations (#9572)
* added vector.rotate

* added vector.forward_from_rotation and vector.up_from_rotation

* added vector.forward_up_to_rotatiton

* fixed some bugs and formatting with vector functions

* shortened name of some new vector functions and added documentation

* made vector.rotate not require a unit vector as axis

* fixed crash with vector.forward_up_to_rot

* renamed new vector functions, made vector.rotate apply a rotation matrix, old vector.rotate is now called vector.rotate_around_axis

* documented vector function changes

* removed some whitespace to appease luacheck

* implemented and fixed optimization of vector.rotate_around_axis by SmallJoker

* added some unit tests for rotation vector functions

* clarified that rotation vectors are in radians and according to the left hand rule

* hopefully appeased luacheck

* renamed rotation_to_horizontal to forward_at_rotation, rotation_to_vertical to up_at_rotation

* handled cases where sin or cos are 0 in rotation vector functions

* added more comments

* clarified documentation of rotation vector functions

* added more unit tests

* changed way in which vector.rotate_around_axis is adjusted for left handed coordinate systems

* made vector.rotate_around_axis actually left handed

* unrolled matrix multiplication

* removed vector.forward_at_rotation and vector.up_at_rotation

* prettified vector.rotate_around_axis, made previous commits not break anything

* removed references to removed vector.forward_at_rotation and vector.up_at_rotation

* removed documentation of removed vector functions

* clarified documentation and fixed styling of rotation vector functions

* restyled comments minorly

* spelling fixes and some hopefully better comments

* allowed 'up' to be missing from vector.directions_to_rotation and removed requirement for unit vectors as arguments

* made vector.rotate_around_axis() right handed again for consistency

* documented previous changes

* made matrix multiplication actually multiply

* renamed vector.directions_to_rotation() to vector.dir_to_rotation()

* optimized a distance comparison

* Fixed potential false positive in unit tests.

Co-authored-by: NetherEran <nethereran@hotmail.com>
2020-06-09 19:38:39 +02:00
..
async Use "core" namespace internally 2014-05-08 13:02:04 -04:00
client Add luacheck to check builtin (#7895) 2019-08-06 19:30:18 +01:00
common Some vector functions useful for working with rotations (#9572) 2020-06-09 19:38:39 +02:00
fstk Add HTTP API to main menu (#9998) 2020-06-06 17:17:08 +01:00
game Add minetest.is_creative_enabled 2020-05-29 22:45:40 +02:00
mainmenu Fix incorrect extension used for ContentDB thumbnails 2020-06-06 18:31:39 +01:00
profiler Profiler: Fix wrong function name for entities 2020-02-23 22:24:12 +01:00
init.lua Add HTTP API to main menu (#9998) 2020-06-06 17:17:08 +01:00
settingtypes.txt Add chat_font_size setting (#9736) 2020-05-24 14:24:13 +02:00