Closed carismoses closed 4 years ago
There is no translation between I
and K
. A OOBB oobb
is represented by a simple rotation from coord. sys I
to system K
(3x3 Matrix). Here, represented by a quternion m_q_KI
. Together with the two points m_minPoint
and m_maxPoint
it fully describes the box.
The center in coord. sys K
is given by
Vector3 K_center = 0.5 * (oobb.m_maxPoint + oobb.m_minPoint);
// or
K_center = oobb.center();
Transforming this back to the I
system, results in
I_center = (oobb.m_q_KI * K_center).eval(); // corresponds to the coord. system transformation I_center = A_IK * K_center (where A_IK = 3x3x matrix)
Look also at oobb.getCornerPoints
https://github.com/gabyx/ApproxMVBB/blob/5618ed4d3d56f8af704ecf5542212a0f67ea478e/include/ApproxMVBB/OOBB.hpp#L181
I understand that m_q_KI is the rotation between frames K and I, but is there an easy way to get the translation between these two frames (from the world frame that the points are represented in to the center of the bounding box)?