* Add a Rotate function to vector2 and copy-pasted some specializations to be used by Lua
Copy-Paste vector3 Lua interface in LuaVector2 so it works for vector2
Expose LuaVector (vector3) and LuaVector2 (vector2) to LVM (example in 'pigui.lua')
Add some utility function (used in PiGui) to LuaVector2
* mainmenu.lua use LuaVector2
Return vector2 for screen position of an object
Pull a vector2d from Lua instead of a size_v
* Port ui.pointOnClock in C++;
Store last 'center' in ui.pointOnClock;
Provide two pointOnClock overrided; Provide lineOnClock;
Use pointOnClock and lineOnClock in Lua;
* Eradicate dependencies of C++ from Vector.lua (see LuaPiGui); vectors in Lua are either LuaVector or LuaVector2
Remove Vector.lua
Remove remaining dependencies from Vector.lua
* Use length() instead of magnitude()
Use length instead of magnitude in order to re-enable radar; Pass vector2 instead of vector3 for aep; Fix some calcultations because of length
* Add '__newindex' function to LuaVector&LuaVector2; CheckFromLua don't return a 'const'; Use vector.x|y|z where useful; Implement some improvement here and there
* New ctor for LuaTable; Avoid rehashing in 'l_pigui_get_projected_bodies';
Use new ctor of LuaTable, caching results;
Some little explanation on new ctor in LuaTable;
* Remove remaining '&' in Space.*
* Use 'lua_typename' in LuaVector and LuaVector2; Move CalcTextAlignment in C++; Cache variable in 'displayDirectionalMarkers'
* Remove 'ImVec2' push/pull, use vector2 instead
* Use __index in game.lua
* Bugfixes: seems vector2 assign value as reference; use 'new_index'"
* Group bodies in C++ using 'Hierarchical Agglomerative Clustering';
Pass results in Lua; Print them
Use reverse iterator in 'l_pigui_get_projected_bodies_grouped';
Reserve memory ahead of time; use group head to check nearest;
use std::accumulate Reduce memory waste; Use std::for_each
Use grouped bodies in game.lua; 'typedef' grouped bodies
Avoid 'pass-the-end' error trying to group the last one
* Add Print to vector2
* Use '__call' metamethod in order to initialize vectors in Lua; Name for vectors are now Vector2 and Vector3
* Split 'is_more_important_than' in a C-to-Lua part and a C++ function and use last directly in 'l_pigui_get_projected_bodies_grouped'
* Use intensively Vector2 in Lua
* Use forward iterator in reverse
* Remove LuaMatrix.* because aren't used
It's fairly rare to be bitten by an unintended implicit conversion,
but when it happens it's confusing as all hell. Also, it makes the code
easier to follow when it's clear what values are vectors and what values
are scalars.
1- it's unused
2- as it's currently written, v[0] and v[1] don't actually work, because
the index must be a vector2f::Component value (to compile, you have to
write v[vector2f::X] or v[vector2f::Y])
3- the ternary operator implementation looks weird, and an (&x)[idx]
implementation is technically invalid (though it works in practice,
and tons of code relies on it or on the same underlying requirements
for field alignment and packing)