Isle
Loading...
Searching...
No Matches
viewlod.h
Go to the documentation of this file.
1#ifndef VIEWLOD_H
2#define VIEWLOD_H
3
4#include "decomp.h"
5#include "realtime/roi.h"
6#include "tgl/tgl.h"
7
9// ViewLOD
10//
11
12// VTABLE: LEGO1 0x100dbd70
13// SIZE 0x0c
20class ViewLOD : public LODObject {
21public:
22 enum {
23 c_bit4 = 0x10
24 };
25
31
35 ~ViewLOD() override;
36
42 double AveragePolyArea() const override { return 2 * 3.14159 * 10.0 / NumPolys(); } // vtable+0x04
43
49 int NVerts() const override { return NumPolys() * 2; } // vtable+0x08
50
56
62
68
74 unsigned char GetUnknown0x08Test4() { return m_unk0x08 & 0xffffff04; }
75
81 unsigned char GetUnknown0x08Test8() { return m_unk0x08 & 0xffffff08; }
82
87 void SetFlag(unsigned char p_flag) { m_unk0x08 |= p_flag; }
88
93 void ClearFlag(unsigned char p_flag) { m_unk0x08 &= ~p_flag; }
94
95 // SYNTHETIC: LEGO1 0x100a6f60
96 // ViewLOD::`scalar deleting destructor'
97
98protected:
103
107 undefined4 m_unk0x08; // 0x08 [AI]
108};
109
110#endif // VIEWLOD_H
[AI] Abstract base class for a Level-of-Detail (LOD) variant of a geometric object.
Definition: roi.h:97
virtual int NumPolys() const =0
[AI] Returns the number of polygons for this LOD.
[AI] Builder class for assembling mesh data and extracting mesh objects.
Definition: tgl.h:768
[AI] Main interface/factory for rendering resources and scene graphs.
Definition: tgl.h:188
[AI] Represents a Level of Detail (LOD) object for rendering, implemented with a mesh builder and sup...
Definition: viewlod.h:20
Tgl::MeshBuilder * m_meshBuilder
[AI] Points to a mesh builder instance for constructing or managing polygonal mesh data for this LOD.
Definition: viewlod.h:102
unsigned char GetUnknown0x08Test8()
[AI] Performs a bitwise AND (mask) with value 0xffffff08 on the internal flag, returning result as an...
Definition: viewlod.h:81
ViewLOD(Tgl::Renderer *pRenderer)
[AI] Constructs a ViewLOD using the provided Tgl Renderer.
Definition: viewlod.h:30
~ViewLOD() override
[AI] Destructor, deletes the owned mesh builder if present.
Definition: viewlod.cpp:4
@ c_bit4
[AI] Flag value for bit 4 mask operation.
Definition: viewlod.h:23
void ClearFlag(unsigned char p_flag)
[AI] Clears a given flag in the internal flags (m_unk0x08) using bitwise AND with negated p_flag.
Definition: viewlod.h:93
undefined4 m_unk0x08
[AI] Internal bitfield for flag/status storage controlling LOD state and behavior.
Definition: viewlod.h:107
undefined4 GetUnknown0x08()
[AI] Returns the internal flag value m_unk0x08.
Definition: viewlod.h:67
const Tgl::MeshBuilder * GetMeshBuilder() const
[AI] Returns a const pointer to the mesh builder for this LOD.
Definition: viewlod.h:61
Tgl::MeshBuilder * GetMeshBuilder()
[AI] Returns a pointer to the mesh builder associated with this LOD.
Definition: viewlod.h:55
void SetFlag(unsigned char p_flag)
[AI] Sets a given flag in the internal flags (m_unk0x08) using bitwise OR.
Definition: viewlod.h:87
unsigned char GetUnknown0x08Test4()
[AI] Performs a bitwise AND (mask) with value 0xffffff04 on the internal flag, returning result as an...
Definition: viewlod.h:74
double AveragePolyArea() const override
[AI] Approximates the average area of polygons within this LOD.
Definition: viewlod.h:42
int NVerts() const override
[AI] Returns the estimated number of vertices in this LOD.
Definition: viewlod.h:49
unsigned int undefined4
Definition: decomp.h:28
#define NULL
[AI] Null pointer value (C/C++ semantics).
Definition: legotypes.h:26