|
wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
|
#include <wowlib/formats/wmo/group/chunks/liquid.hpp>
Public Member Functions | |
| Result< void > | read (std::span< const std::byte > payload) |
| Decode the MLIQ payload (the serializer's read hook). | |
| Result< void > | write (FileBuffer &out) const |
| Encode the MLIQ payload (the serializer's write hook): the 30-byte header field-by-field, then the vertex and tile grids verbatim. | |
| bool | empty () const |
Public Attributes | |
| C2IVector | vertsDim {} |
| C2IVector | tilesDim {} |
| C3Vector | baseCoords {} |
| std::uint16_t | materialId = 0 |
| std::vector< SMOLVert > | vertices |
| std::vector< SMOLTile > | tiles |
Static Public Attributes | |
| static constexpr std::size_t | HeaderSize = 30 |
| The on-disk header size: four 4-byte ints, a 12-byte vector and a 2-byte material id, with no trailing padding — unlike sizeof(a natural struct), which would pad the material id up to a 4-byte boundary. | |
Definition at line 85 of file liquid.hpp.
|
inlinenodiscard |
Definition at line 188 of file liquid.hpp.
References vertices.
|
inline |
Decode the MLIQ payload (the serializer's read hook).
Reads the 30-byte header field-by-field, derives the two array lengths from it and copies the vertex and tile grids.
| payload | the chunk payload bytes. |
Definition at line 128 of file liquid.hpp.
References baseCoords, wowlib::ChunkTruncated, HeaderSize, wowlib::makeError(), materialId, tiles, tilesDim, vertices, and vertsDim.
|
inline |
Encode the MLIQ payload (the serializer's write hook): the 30-byte header field-by-field, then the vertex and tile grids verbatim.
| out | the destination buffer (appended, not cleared). |
Definition at line 168 of file liquid.hpp.
References baseCoords, materialId, tiles, tilesDim, vertices, and vertsDim.
| C3Vector wowlib::formats::wmo::group::chunks::MLIQData::baseCoords {} |
Definition at line 102 of file liquid.hpp.
|
staticconstexpr |
The on-disk header size: four 4-byte ints, a 12-byte vector and a 2-byte material id, with no trailing padding — unlike sizeof(a natural struct), which would pad the material id up to a 4-byte boundary.
Definition at line 119 of file liquid.hpp.
Referenced by read().
| std::uint16_t wowlib::formats::wmo::group::chunks::MLIQData::materialId = 0 |
Definition at line 106 of file liquid.hpp.
| std::vector<SMOLTile> wowlib::formats::wmo::group::chunks::MLIQData::tiles |
Definition at line 114 of file liquid.hpp.
| C2IVector wowlib::formats::wmo::group::chunks::MLIQData::tilesDim {} |
Definition at line 99 of file liquid.hpp.
| std::vector<SMOLVert> wowlib::formats::wmo::group::chunks::MLIQData::vertices |
Definition at line 110 of file liquid.hpp.
| C2IVector wowlib::formats::wmo::group::chunks::MLIQData::vertsDim {} |
Definition at line 95 of file liquid.hpp.