[AI] Level-Of-Detail (LOD) object used for rendering and managing polygonal mesh data with LOD switching.
More...
|
| | LegoLOD (Tgl::Renderer *) |
| | [AI] Constructor. More...
|
| |
| | ~LegoLOD () override |
| | [AI] Destructor. More...
|
| |
| int | NumPolys () const override |
| | [AI] Get number of polygons (faces) for this LOD. More...
|
| |
| float | VTable0x10 () override |
| | [AI] Reserved LOD callback, returns zero. More...
|
| |
| 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). More...
|
| |
| LegoLOD * | Clone (Tgl::Renderer *p_renderer) |
| | [AI] Create an exact copy of this LOD, including cloned meshes, for another (or the same) renderer. More...
|
| |
| 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. More...
|
| |
| LegoResult | SetTextureInfo (LegoTextureInfo *p_textureInfo) |
| | [AI] Assigns the same texture group to all textured meshes in this LOD. More...
|
| |
| LegoResult | FUN_100aad70 (LegoTextureInfo *p_textureInfo) |
| | [AI] Assigns the group texture to all textured meshes, but does NOT override mesh color. More...
|
| |
| void | ClearMeshOffset () |
| | [AI] Reset mesh offset index to start at 0, affecting which meshes are updated by future color/texture calls. More...
|
| |
| LegoResult | GetTextureInfo (LegoTextureInfo *&p_textureInfo) |
| | [AI] Retrieves the texture info/group of the first mesh with group texture in this LOD. More...
|
| |
| | ViewLOD (Tgl::Renderer *pRenderer) |
| | [AI] Constructs a ViewLOD using the provided Tgl Renderer. More...
|
| |
| | ~ViewLOD () override |
| | [AI] Destructor, deletes the owned mesh builder if present. More...
|
| |
| double | AveragePolyArea () const override |
| | [AI] Approximates the average area of polygons within this LOD. More...
|
| |
| int | NVerts () const override |
| | [AI] Returns the estimated number of vertices in this LOD. More...
|
| |
| Tgl::MeshBuilder * | GetMeshBuilder () |
| | [AI] Returns a pointer to the mesh builder associated with this LOD. More...
|
| |
| const Tgl::MeshBuilder * | GetMeshBuilder () const |
| | [AI] Returns a const pointer to the mesh builder for this LOD. More...
|
| |
| undefined4 | GetUnknown0x08 () |
| | [AI] Returns the internal flag value m_unk0x08. More...
|
| |
| unsigned char | GetUnknown0x08Test4 () |
| | [AI] Performs a bitwise AND (mask) with value 0xffffff04 on the internal flag, returning result as an unsigned char. More...
|
| |
| unsigned char | GetUnknown0x08Test8 () |
| | [AI] Performs a bitwise AND (mask) with value 0xffffff08 on the internal flag, returning result as an unsigned char. More...
|
| |
| void | SetFlag (unsigned char p_flag) |
| | [AI] Sets a given flag in the internal flags (m_unk0x08) using bitwise OR. More...
|
| |
| void | ClearFlag (unsigned char p_flag) |
| | [AI] Clears a given flag in the internal flags (m_unk0x08) using bitwise AND with negated p_flag. More...
|
| |
| virtual | ~LODObject () |
| |
| virtual double | AveragePolyArea () const =0 |
| | [AI] Returns the average polygon area for this LOD. More...
|
| |
| virtual int | NVerts () const =0 |
| | [AI] Returns the number of vertices for this LOD. More...
|
| |
| virtual int | NumPolys () const =0 |
| | [AI] Returns the number of polygons for this LOD. More...
|
| |
| virtual float | VTable0x10 ()=0 |
| | [AI] Unknown method related to the LOD. More...
|
| |
[AI] Level-Of-Detail (LOD) object used for rendering and managing polygonal mesh data with LOD switching.
LegoLOD extends ViewLOD to provide support for handling multiple Tgl::Mesh objects, each potentially representing a different material/texture within a single LOD, as used in LEGO Island's 3D engine. Provides mesh management, LOD data loading, cloning, color and texture assignment. Deserialization from storage populates mesh arrays and applies material/texture as needed.
Typical usage: constructed and filled by the resource system (LegoROI and friends) to store mesh geometry of an object at a specific LOD.
Meshes may be indexed/colorized or texturized depending on geometry/material; supports group color/texture assignment for variants.
- Note
- [AI] Deletion of this object will clean up allocated meshes and mesh arrays.
Definition at line 27 of file legolod.h.
[AI] Load LOD geometry and material info from storage, building Tgl::Mesh group(s).
Reads geometry/mesh data, materials, textures, palette, and builds meshes as needed. Associates meshes with correct renderer/textures.
- Parameters
-
| p_renderer | Renderer to allocate resources for. [AI] |
| p_textureContainer | Container to look up (by name) textures/material groups. [AI] |
| p_storage | Stream/storage to read LOD binary data from. [AI] |
- Returns
- Result code indicating success/failure of load. [AI]
Definition at line 56 of file legolod.cpp.
[AI] Assigns the same texture group to all textured meshes in this LOD.
All meshes with m_unk0x04==TRUE will have their group texture set to the provided texture info. Used when switching/animating texture variants. Also sets mesh color to (1,1,1,0) for those meshes.
- Parameters
-
| p_textureInfo | Pointer to desired texture info/group. [AI] |
- Returns
- Success/failure code. [AI]
Definition at line 340 of file legolod.cpp.