mirror of
https://github.com/isledecomp/isle.git
synced 2025-12-09 23:53:02 +00:00
Implement ViewROI and base classes (#287)
* Implement ViewROI and base classes * Clean up Orientable header * Move tgl to tgl subdirectory, and use target_include_directories * Move classes to submodules * Fix some missed references * Fix/match UpdateWorldData * Renaming / removing MxTypes / refactoring * Consistent naming for Matrix * Adjust format action * Add Vector3/Vector4 to Data vector * Add TGL comment * Add a comment about Matrix4Impl * Add ROI comment --------- Co-authored-by: Anonymous Maarten <anonymous.maarten@gmail.com> Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
45
LEGO1/viewmanager/viewroi.cpp
Normal file
45
LEGO1/viewmanager/viewroi.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
#include "viewroi.h"
|
||||
|
||||
#include "../decomp.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(ViewROI, 0xe0)
|
||||
|
||||
// OFFSET: LEGO1 0x100a9eb0
|
||||
float ViewROI::IntrinsicImportance() const
|
||||
{
|
||||
return .5;
|
||||
} // for now
|
||||
|
||||
// OFFSET: LEGO1 0x100a9ec0
|
||||
const Tgl::Group* ViewROI::GetGeometry() const
|
||||
{
|
||||
return geometry;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100a9ed0
|
||||
Tgl::Group* ViewROI::GetGeometry()
|
||||
{
|
||||
return geometry;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100a9ee0
|
||||
void ViewROI::UpdateWorldData(const Matrix4Data& parent2world)
|
||||
{
|
||||
OrientableROI::UpdateWorldData(parent2world);
|
||||
if (geometry) {
|
||||
// Tgl::FloatMatrix4 tgl_mat;
|
||||
Matrix4 mat;
|
||||
SETMAT4(mat, m_local2world.GetMatrix());
|
||||
Tgl::Result result = geometry->SetTransformation(mat);
|
||||
// assert(Tgl::Succeeded(result));
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100aa250 TEMPLATE
|
||||
// ViewROI::`scalar deleting destructor'
|
||||
inline ViewROI::~ViewROI()
|
||||
{
|
||||
// SetLODList() will decrease refCount of LODList
|
||||
SetLODList(0);
|
||||
delete geometry;
|
||||
}
|
||||
Reference in New Issue
Block a user