Isle
Loading...
Searching...
No Matches
legolod.h
Go to the documentation of this file.
1#ifndef LEGOLOD_H
2#define LEGOLOD_H
3
4#include "misc/legotypes.h"
6
9class LegoStorage;
10
11// VTABLE: LEGO1 0x100dbf10
12// SIZE 0x20
27class LegoLOD : public ViewLOD {
28public:
29 // SIZE 0x08
36 struct Mesh {
39 };
40
46
50 ~LegoLOD() override;
51
55 int NumPolys() const override { return m_numPolys; } // vtable+0x0c
56
60 float VTable0x10() override { return 0.0; } // vtable+0x10
61
73 LegoResult Read(Tgl::Renderer* p_renderer, LegoTextureContainer* p_textureContainer, LegoStorage* p_storage);
74
82 LegoLOD* Clone(Tgl::Renderer* p_renderer);
83
95 LegoResult SetColor(LegoFloat p_red, LegoFloat p_green, LegoFloat p_blue, LegoFloat p_alpha);
96
107
117
121 void ClearMeshOffset();
122
132
141 static LegoBool FUN_100aae20(const LegoChar* p_name);
142
143 // SYNTHETIC: LEGO1 0x100aa430
144 // LegoLOD::`scalar deleting destructor'
145
146protected:
152};
153
154#endif // LEGOLOD_H
[AI] Level-Of-Detail (LOD) object used for rendering and managing polygonal mesh data with LOD switch...
Definition: legolod.h:27
LegoResult FUN_100aad70(LegoTextureInfo *p_textureInfo)
[AI] Assigns the group texture to all textured meshes, but does NOT override mesh color.
Definition: legolod.cpp:354
int NumPolys() const override
[AI] Get number of polygons (faces) for this LOD.
Definition: legolod.h:55
void ClearMeshOffset()
[AI] Reset mesh offset index to start at 0, affecting which meshes are updated by future color/textur...
Definition: legolod.cpp:393
LegoU32 m_numPolys
Total number of polygons (faces) across all meshes (NumPolys implementation). [AI].
Definition: legolod.h:150
LegoU32 m_meshOffset
Internal mesh starting index for iteration; used for color/texture selective assignment....
Definition: legolod.h:151
~LegoLOD() override
[AI] Destructor.
Definition: legolod.cpp:39
LegoLOD * Clone(Tgl::Renderer *p_renderer)
[AI] Create an exact copy of this LOD, including cloned meshes, for another (or the same) renderer.
Definition: legolod.cpp:306
LegoResult SetTextureInfo(LegoTextureInfo *p_textureInfo)
[AI] Assigns the same texture group to all textured meshes in this LOD.
Definition: legolod.cpp:340
float VTable0x10() override
[AI] Reserved LOD callback, returns zero.
Definition: legolod.h:60
LegoResult SetColor(LegoFloat p_red, LegoFloat p_green, LegoFloat p_blue, LegoFloat p_alpha)
[AI] Overrides the color of all non-textured mesh parts for this LOD.
Definition: legolod.cpp:328
LegoResult GetTextureInfo(LegoTextureInfo *&p_textureInfo)
[AI] Retrieves the texture info/group of the first mesh with group texture in this LOD.
Definition: legolod.cpp:366
LegoU32 m_numVertices
Total number of vertices across all mesh parts. Used for stats and validation. [AI].
Definition: legolod.h:149
LegoResult Read(Tgl::Renderer *p_renderer, LegoTextureContainer *p_textureContainer, LegoStorage *p_storage)
[AI] Load LOD geometry and material info from storage, building Tgl::Mesh group(s).
Definition: legolod.cpp:56
static LegoBool FUN_100aae20(const LegoChar *p_name)
[AI] Helper to check if a mesh/material name matches the "inh" group, which separates non-inheritable...
Definition: legolod.cpp:380
LegoU32 m_numMeshes
Number of sub-meshes held in m_melems. [AI].
Definition: legolod.h:148
Mesh * m_melems
Array of mesh struct objects representing all mesh parts that make up this LOD. [AI].
Definition: legolod.h:147
Abstract base class providing an interface for file-like storage with binary and text read/write oper...
Definition: legostorage.h:16
Specialized LegoContainer handling LegoTextureInfo objects and their DirectDraw/Direct3D caching.
[AI] Contains DirectDraw and Direct3DRM handles and metadata for a texture used in the LEGO Island re...
[AI] Represents a renderable 3D mesh.
Definition: tgl.h:596
[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
typedef BOOL(FAR PASCAL *LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA
[AI] Defines basic fixed-width data types and platform-neutral constants for LEGO Island codebase.
unsigned long LegoU32
[AI] Unsigned 32-bit integer type for cross-platform compatibility.
Definition: legotypes.h:71
char LegoChar
[AI] Alias for char, for use in character/byte data and string handling.
Definition: legotypes.h:83
LegoS32 LegoResult
[AI] Function result type (return code): typically SUCCESS (0) or FAILURE (-1).
Definition: legotypes.h:101
float LegoFloat
[AI] Floating point type used throughout LEGO Island.
Definition: legotypes.h:77
LegoU8 LegoBool
[AI] Boolean value used throughout the codebase.
Definition: legotypes.h:89
[AI] Structure representing a sub-mesh and its texturization flag.
Definition: legolod.h:36
BOOL m_unk0x04
Indicates if this mesh has a texture group assigned (TRUE = textured). [AI].
Definition: legolod.h:38
Tgl::Mesh * m_tglMesh
Pointer to the mesh object for rendering. [AI].
Definition: legolod.h:37