First the method I said its only used to get the rotation angles from the vectors direction, wich means that having a vector pointing from 0, 0, 0 to 1, 0, 0 will give you a vector in the X axis with these rotations:
vector:
1, 0, 0
rotations:
0, 0, 0
assuming the rotation starts from 0 to 360
the problem here are more than one, you dont know where the rotation starts because I only have one vector and that doensn’t give a starting point to count the rotation, and the ohter problem is that even if I have, wich one will I pick knowing that a perpendicular vector to this one can be infinite of them, because they belong to the same plane
but if you have:
this only works for the entire object, one cube or one piece made from many vertices and only one central point of rotation, wich you can change later
top vector
0, 1, 0 -> pointing Y, is pointin up
side vector
1, 0, 0 -> pointin X, is pointing side
these will be:
rotations
0, 0, 0 -> means 0 rotation on X, 0 rotation on Y, and 0 on Z
if I change the side vector to this:
side:
0, 0, 1
top:
0, 1, 0 -> the top remains the same because the rotation on side vector didn’t afect it
the rotation angles will be:
0, 90, 0
now you can see, why the top vector remains unchanged, and why a rotation can not affect the normal vector, so a rotation made in Y axis won’t change the top, and thats why you need the side for that
now for this, you have
a simple equation to get the angle from the direction of a vector:
Size = (VectorLength(Side)*VectorLength(YAxis));
RotationVector = VectorCrossProduct(Side, YAxis);
if Size == 0
AngleOnY = 0
else AngleOnY = arccos(VectorDotProduct(V, YAxis) /Size));
if AngleOnY < 0
AngleOnY := -AngleOnY;
this can give you a way to calculate the angles from each axis, and having each angles you can calculate other things