Im having fun playing around with 3D rendering thanks to Oysis tutorial,
infact im working on a lil' project that might let one import and render defined 3D models from lua tables...
The only issue im now struggling is , Oysi you showed in tutorials how to rotate the scene around a where the viewport is,
BUT how does one rotate a polygon (say a cube) locally...
Note i have access to a BEAUTIFUL matrix3 library that has let me speed things up alot (i can to matrix*matrix and get the proper result asif it was simple maths like 1+1...) so i have all global scene rotations using rotation matrices but im missing that crucial local rotation matrices... any links you can point me towards so i can read up would be helpful
EDIT :
Ok scratch that, after thinking about it i figured out a way :
First store any translations made to the polygon, easily done using 3 values to represent x,y,z of total translation
Then to do local rotation you first translate the polygon using the inverse of the stored translation
do rotation as one would normally, but only on that polygons vertexes
lastly translate the polygon using the translation stored (not the inverse)
I have a working rotation around selfs center on Y axis, now to toss in the others and do that annoying sorting for drawing...
the only issue is this assumes ALL polygons define thier origin as {0,0,0} regardless, though if I get the difference of their origin to the center it might be ignorable..i think (untested this part)