[Closed] Object orientation: EulerAngles or Quat from axis projection
Can anyone help me figure out how to get object orientation/rotation from a set of data which seems to be projections of objects local axes to worlds axes?
I need to set object orientation/rotation in 3DS Max from data which looks like that:
“xAxis”: {
“x”: 0.740976870059967,
“y”: 0.0474829375743866,
“z”: 0.6698497533798218
},
“yAxis”: {
“x”: 0.19436399638652802,
“y”: 0.9396376609802246,
“z”: -0.2816094160079956
},
“zAxis”: {
“x”: -0.6427875757217407,
“y”: 0.33886075019836426,
“z”: 0.6870207190513611
}
I can parse this JSON and get this data as #(point3, point3, point3) array.
But I do not understand how to convert it into EulerAngles, Quat or Matrix3.
Thanks in advance for any help!
The values are the coordinates of unitary vectors (that’s good) and are ortogonal to each other (that’s good too).
If I’m not wrong (and I still remember something about 3dsMax and Matrix3), these coordinates should be the first three rows of the object’s transform matrix. Fourth row is the object’s position.