Implement OrientableROI::GetLocalTransform (#652)

This commit is contained in:
Christian Semmler 2024-03-10 11:10:53 -04:00 committed by GitHub
parent d090b449d1
commit 6972142923
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -66,10 +66,35 @@ void OrientableROI::WrappedVTable0x24(const Matrix4& p_transform)
VTable0x24(p_transform); VTable0x24(p_transform);
} }
// STUB: LEGO1 0x100a50a0 // FUNCTION: LEGO1 0x100a50a0
void OrientableROI::GetLocalTransform(Matrix4& p_transform) void OrientableROI::GetLocalTransform(Matrix4& p_transform)
{ {
p_transform = m_local2world; MxMatrix mat;
if (m_parentROI != NULL) {
double local2parent[4][4];
unsigned int i, j;
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
local2parent[i][j] = m_parentROI->GetLocal2World()[i][j];
}
}
double local_inverse[4][4];
INVERTMAT4d(local_inverse, local2parent);
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
mat[i][j] = local_inverse[i][j];
}
}
MXM4(p_transform, m_local2world, mat);
}
else {
p_transform = m_local2world;
}
} }
// FUNCTION: LEGO1 0x100a58f0 // FUNCTION: LEGO1 0x100a58f0