Isle
Loading...
Searching...
No Matches
viewroi.h
Go to the documentation of this file.
1#ifndef VIEWROI_H
2#define VIEWROI_H
3
4#include "decomp.h"
6#include "tgl/tgl.h"
7#include "viewlodlist.h"
8
13class ViewROI : public OrientableROI {
14public:
21 ViewROI(Tgl::Renderer* pRenderer, ViewLODList* lodList)
22 {
23 SetLODList(lodList);
24 geometry = pRenderer->CreateGroup();
25 m_unk0xe0 = -1;
26 }
27
32 ~ViewROI() override
33 {
34 // SetLODList() will decrease refCount of LODList
35 SetLODList(0);
36 delete geometry;
37 }
38
44 void SetLODList(ViewLODList* lodList)
45 {
46 // ??? inherently type unsafe - kind of... because, now, ROI
47 // does not expose SetLODs() ...
48 // solution: create pure virtual LODListBase* ROI::GetLODList()
49 // and let derived ROI classes hold the LODList
50
51 if (lods) {
52 reinterpret_cast<ViewLODList*>(lods)->Release();
53 }
54
55 lods = lodList;
56
57 if (lods) {
58 reinterpret_cast<ViewLODList*>(lods)->AddRef();
59 }
60 }
61
67 float IntrinsicImportance() const override; // vtable+0x04
68
74 void VTable0x1c() override; // vtable+0x1c
75
81 void SetLocalTransform(const Matrix4& p_transform) override; // vtable+0x20
82
88 void VTable0x24(const Matrix4& p_transform) override; // vtable+0x24
89
95 virtual Tgl::Group* GetGeometry(); // vtable+0x30
96
101 virtual const Tgl::Group* GetGeometry() const; // vtable+0x34
102
108 int GetUnknown0xe0() { return m_unk0xe0; }
109
114 void SetUnknown0xe0(int p_unk0xe0) { m_unk0xe0 = p_unk0xe0; }
115
122 static undefined SetUnk101013d8(undefined p_flag);
123
124protected:
130 void UpdateWorldData(const Matrix4& parent2world) override; // vtable+0x28
131
136
141 int m_unk0xe0; // 0xe0
142};
143
144// SYNTHETIC: LEGO1 0x100aa250
145// ViewROI::`scalar deleting destructor'
146
147#endif // VIEWROI_H
4x4 Matrix class with virtual interface for manipulation and transformation.
Definition: matrix.h:24
[AI] Represents an ROI (Real-time Object Instance) that can be oriented in world space,...
Definition: orientableroi.h:29
LODListBase * lods
[AI] Pointer to list of LODObject instances, or NULL if not set. [AI]
Definition: roi.h:242
[AI] Scene graph node for parental transforms/color/material/texture; can hold meshes or other groups...
Definition: tgl.h:669
[AI] Main interface/factory for rendering resources and scene graphs.
Definition: tgl.h:188
virtual Group * CreateGroup(const Group *pParent=0)=0
[AI] Creates a new group (scene graph node), optionally parented.
[AI] Reference-counted list of Level-of-Detail (LOD) objects associated with a single ROI (Realtime O...
Definition: viewlodlist.h:30
[AI] ViewROI objects represent viewable and placeable objects in the scene, each holding their own tr...
Definition: viewroi.h:13
int GetUnknown0xe0()
[AI] Gets the value of an internal state field at offset 0xe0.
Definition: viewroi.h:108
void SetUnknown0xe0(int p_unk0xe0)
[AI] Sets the value of the internal state field at offset 0xe0.
Definition: viewroi.h:114
int m_unk0xe0
[AI] Unidentified state integer, typically initialized to -1.
Definition: viewroi.h:141
void SetLocalTransform(const Matrix4 &p_transform) override
[AI] Sets the local transformation; propagates to the underlying geometry group.
Definition: viewroi.cpp:57
~ViewROI() override
[AI] Destructor cleans up internal geometry and releases LOD list reference.
Definition: viewroi.h:32
static undefined SetUnk101013d8(undefined p_flag)
[AI] Sets the global flag g_unk101013d8 and returns its previous value.
Definition: viewroi.cpp:81
void VTable0x24(const Matrix4 &p_transform) override
[AI] Updates an internal transformation, synchronizing ROI and geometry.
Definition: viewroi.cpp:45
virtual Tgl::Group * GetGeometry()
[AI] Returns a pointer to this ROI's Tgl::Group geometry for rendering and manipulation.
Definition: viewroi.cpp:19
void VTable0x1c() override
[AI] Updates internal state, potentially related to animation or LOD switching (exact purpose unclear...
Definition: viewroi.cpp:69
void UpdateWorldData(const Matrix4 &parent2world) override
[AI] Updates object's and geometry's world transformation based on parent's world matrix.
Definition: viewroi.cpp:31
ViewROI(Tgl::Renderer *pRenderer, ViewLODList *lodList)
[AI] Constructs a ViewROI with the specified renderer and LOD list.
Definition: viewroi.h:21
void SetLODList(ViewLODList *lodList)
[AI] Sets the ViewLODList for this ROI, managing reference counting.
Definition: viewroi.h:44
Tgl::Group * geometry
[AI] Root group for all geometry/renderable objects for this ROI.
Definition: viewroi.h:135
float IntrinsicImportance() const override
[AI] Returns the intrinsic importance of this ROI, used for LOD or sorting.
Definition: viewroi.cpp:13
unsigned char undefined
Definition: decomp.h:26