2023-11-19 09:38:07 -05:00
|
|
|
#include "viewroi.h"
|
|
|
|
|
2023-12-11 16:33:46 -05:00
|
|
|
#include "decomp.h"
|
2023-11-19 09:38:07 -05:00
|
|
|
|
2024-01-12 19:34:38 -05:00
|
|
|
#include <vec.h>
|
|
|
|
|
2024-03-01 12:19:41 -05:00
|
|
|
DECOMP_SIZE_ASSERT(ViewROI, 0xe4)
|
2023-11-19 09:38:07 -05:00
|
|
|
|
2024-01-01 19:17:38 -05:00
|
|
|
// GLOBAL: LEGO1 0x101013d8
|
|
|
|
undefined g_unk101013d8 = 0;
|
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x100a9eb0
|
2023-11-19 09:38:07 -05:00
|
|
|
float ViewROI::IntrinsicImportance() const
|
|
|
|
{
|
|
|
|
return .5;
|
|
|
|
} // for now
|
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x100a9ec0
|
2024-03-04 16:57:35 -05:00
|
|
|
Tgl::Group* ViewROI::GetGeometry()
|
2023-11-19 09:38:07 -05:00
|
|
|
{
|
|
|
|
return geometry;
|
|
|
|
}
|
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x100a9ed0
|
2024-03-04 16:57:35 -05:00
|
|
|
const Tgl::Group* ViewROI::GetGeometry() const
|
2023-11-19 09:38:07 -05:00
|
|
|
{
|
|
|
|
return geometry;
|
|
|
|
}
|
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x100a9ee0
|
2024-03-01 12:19:41 -05:00
|
|
|
void ViewROI::UpdateWorldData(const Matrix4& parent2world)
|
2023-11-19 09:38:07 -05:00
|
|
|
{
|
|
|
|
OrientableROI::UpdateWorldData(parent2world);
|
2024-01-12 19:34:38 -05:00
|
|
|
|
2023-11-19 09:38:07 -05:00
|
|
|
if (geometry) {
|
2024-01-12 19:34:38 -05:00
|
|
|
Tgl::FloatMatrix4 matrix;
|
|
|
|
Matrix4 in(matrix);
|
|
|
|
SETMAT4(in, m_local2world);
|
|
|
|
Tgl::Result result = geometry->SetTransformation(matrix);
|
2023-11-19 09:38:07 -05:00
|
|
|
// assert(Tgl::Succeeded(result));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-03-05 16:15:32 -05:00
|
|
|
// FUNCTION: LEGO1 0x100a9fc0
|
2024-03-01 12:19:41 -05:00
|
|
|
void ViewROI::VTable0x24(const Matrix4& p_transform)
|
2024-01-20 18:04:46 -05:00
|
|
|
{
|
2024-03-05 16:15:32 -05:00
|
|
|
OrientableROI::VTable0x24(p_transform);
|
|
|
|
if (geometry) {
|
|
|
|
Tgl::FloatMatrix4 matrix;
|
|
|
|
Matrix4 in(matrix);
|
|
|
|
SETMAT4(in, m_local2world);
|
|
|
|
geometry->SetTransformation(matrix);
|
|
|
|
}
|
2024-01-20 18:04:46 -05:00
|
|
|
}
|
|
|
|
|
2024-03-05 16:15:32 -05:00
|
|
|
// FUNCTION: LEGO1 0x100aa0a0
|
2024-01-20 18:04:46 -05:00
|
|
|
void ViewROI::SetLocalTransform(const Matrix4& p_transform)
|
|
|
|
{
|
2024-03-05 16:15:32 -05:00
|
|
|
OrientableROI::SetLocalTransform(p_transform);
|
|
|
|
if (geometry) {
|
|
|
|
Tgl::FloatMatrix4 matrix;
|
|
|
|
Matrix4 in(matrix);
|
|
|
|
SETMAT4(in, m_local2world);
|
|
|
|
geometry->SetTransformation(matrix);
|
|
|
|
}
|
2024-01-20 18:04:46 -05:00
|
|
|
}
|
|
|
|
|
2024-03-05 16:15:32 -05:00
|
|
|
// FUNCTION: LEGO1 0x100aa180
|
2024-01-20 18:04:46 -05:00
|
|
|
void ViewROI::VTable0x1c()
|
|
|
|
{
|
2024-03-05 16:15:32 -05:00
|
|
|
OrientableROI::VTable0x1c();
|
|
|
|
if (geometry) {
|
|
|
|
Tgl::FloatMatrix4 matrix;
|
|
|
|
Matrix4 in(matrix);
|
|
|
|
SETMAT4(in, m_local2world);
|
|
|
|
geometry->SetTransformation(matrix);
|
|
|
|
}
|
2024-01-20 18:04:46 -05:00
|
|
|
}
|
|
|
|
|
2024-01-01 19:17:38 -05:00
|
|
|
// FUNCTION: LEGO1 0x100aa500
|
|
|
|
undefined ViewROI::SetUnk101013d8(undefined p_flag)
|
2023-11-19 09:38:07 -05:00
|
|
|
{
|
2024-01-01 19:17:38 -05:00
|
|
|
undefined oldFlag = g_unk101013d8;
|
|
|
|
g_unk101013d8 = p_flag;
|
|
|
|
return oldFlag;
|
2023-11-19 09:38:07 -05:00
|
|
|
}
|