|
wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
|
One liquid layer of one terrain cell, fully decoded (an MH2O instance). More...
#include <wowlib/formats/adt/liquid.hpp>
Public Member Functions | |
| bool | operator== (const LiquidInstance &) const =default |
| std::size_t | vertexCount () const |
| The vertex count each present array holds. | |
Public Attributes | |
| std::uint16_t | liquidType = 0 |
| The liquid type (a LiquidType foreign key: 1 ocean, 2 ocean-flat, 3 slime, 5/6 magma, …). | |
| std::uint16_t | liquidObjectOrLvf = 0 |
| The stored liquid_object_or_lvf field: a LiquidObject id (>= 42) or a raw LiquidVertexFormat; vertex_format holds the resolved layout. | |
| LiquidVertexFormat | vertexFormat = LiquidVertexFormat::HeightDepth |
| The resolved vertex layout wowlib decoded (and will re-lay). | |
| float | minHeight = 0 |
| Minimum surface height (the flat height when no heightmap). | |
| float | maxHeight = 0 |
| Maximum surface height. | |
| std::uint8_t | xOffset = 0 |
| The liquid rectangle's x offset within the cell (0-7). | |
| std::uint8_t | yOffset = 0 |
| The liquid rectangle's y offset within the cell (0-7). | |
| std::uint8_t | width = 8 |
| The liquid rectangle width in tiles (1-8). | |
| std::uint8_t | height = 8 |
| The liquid rectangle height in tiles (1-8). | |
| std::vector< std::uint8_t > | existsBitmap |
| The per-tile exists mask, width x height bits row-major (LSB first); empty means every tile renders. | |
| std::vector< float > | heightmap |
| Surface heights, (width+1) x (height+1) row-major; present for vertex formats height_depth, height_uv, height_uv_depth. | |
| std::vector< std::uint8_t > | depthmap |
| Depth bytes, (width+1) x (height+1) row-major; present for height_depth, depth_only, height_uv_depth. | |
| std::vector< UVMapEntry > | uvmap |
| UV texture coordinates, (width+1) x (height+1) row-major; present for height_uv and height_uv_depth. | |
One liquid layer of one terrain cell, fully decoded (an MH2O instance).
The vertex arrays are present per the vertexFormat; the exists mask (when non-empty) selects which of the width x height tiles render. All binary offsets are derived on write.
Definition at line 43 of file liquid.hpp.
|
default |
|
inline |
The vertex count each present array holds.
Definition at line 83 of file liquid.hpp.
Referenced by wowlib::formats::adt::MH2OData::read().
| std::vector<std::uint8_t> wowlib::formats::adt::LiquidInstance::depthmap |
Depth bytes, (width+1) x (height+1) row-major; present for height_depth, depth_only, height_uv_depth.
Definition at line 75 of file liquid.hpp.
Referenced by wowlib::formats::adt::MH2OData::read(), and wowlib::formats::adt::MH2OData::write().
| std::vector<std::uint8_t> wowlib::formats::adt::LiquidInstance::existsBitmap |
The per-tile exists mask, width x height bits row-major (LSB first); empty means every tile renders.
Definition at line 69 of file liquid.hpp.
Referenced by wowlib::formats::adt::MH2OData::read(), and wowlib::formats::adt::MH2OData::write().
| std::uint8_t wowlib::formats::adt::LiquidInstance::height = 8 |
The liquid rectangle height in tiles (1-8).
Definition at line 66 of file liquid.hpp.
Referenced by wowlib::formats::adt::MH2OData::read(), vertexCount(), and wowlib::formats::adt::MH2OData::write().
| std::vector<float> wowlib::formats::adt::LiquidInstance::heightmap |
Surface heights, (width+1) x (height+1) row-major; present for vertex formats height_depth, height_uv, height_uv_depth.
Definition at line 72 of file liquid.hpp.
Referenced by wowlib::formats::adt::MH2OData::read(), and wowlib::formats::adt::MH2OData::write().
| std::uint16_t wowlib::formats::adt::LiquidInstance::liquidObjectOrLvf = 0 |
The stored liquid_object_or_lvf field: a LiquidObject id (>= 42) or a raw LiquidVertexFormat; vertex_format holds the resolved layout.
Definition at line 48 of file liquid.hpp.
Referenced by wowlib::formats::adt::MH2OData::read().
| std::uint16_t wowlib::formats::adt::LiquidInstance::liquidType = 0 |
The liquid type (a LiquidType foreign key: 1 ocean, 2 ocean-flat, 3 slime, 5/6 magma, …).
Definition at line 45 of file liquid.hpp.
Referenced by wowlib::formats::adt::MH2OData::read(), and wowlib::formats::adt::MH2OData::write().
| float wowlib::formats::adt::LiquidInstance::maxHeight = 0 |
Maximum surface height.
Definition at line 57 of file liquid.hpp.
Referenced by wowlib::formats::adt::MH2OData::read(), and wowlib::formats::adt::MH2OData::write().
| float wowlib::formats::adt::LiquidInstance::minHeight = 0 |
Minimum surface height (the flat height when no heightmap).
Definition at line 54 of file liquid.hpp.
Referenced by wowlib::formats::adt::MH2OData::read(), and wowlib::formats::adt::MH2OData::write().
| std::vector<UVMapEntry> wowlib::formats::adt::LiquidInstance::uvmap |
UV texture coordinates, (width+1) x (height+1) row-major; present for height_uv and height_uv_depth.
Definition at line 78 of file liquid.hpp.
Referenced by wowlib::formats::adt::MH2OData::read(), and wowlib::formats::adt::MH2OData::write().
| LiquidVertexFormat wowlib::formats::adt::LiquidInstance::vertexFormat = LiquidVertexFormat::HeightDepth |
The resolved vertex layout wowlib decoded (and will re-lay).
Definition at line 51 of file liquid.hpp.
Referenced by wowlib::formats::adt::MH2OData::read().
| std::uint8_t wowlib::formats::adt::LiquidInstance::width = 8 |
The liquid rectangle width in tiles (1-8).
Definition at line 64 of file liquid.hpp.
Referenced by wowlib::formats::adt::MH2OData::read(), vertexCount(), and wowlib::formats::adt::MH2OData::write().
| std::uint8_t wowlib::formats::adt::LiquidInstance::xOffset = 0 |
The liquid rectangle's x offset within the cell (0-7).
Definition at line 60 of file liquid.hpp.
Referenced by wowlib::formats::adt::MH2OData::read(), and wowlib::formats::adt::MH2OData::write().
| std::uint8_t wowlib::formats::adt::LiquidInstance::yOffset = 0 |
The liquid rectangle's y offset within the cell (0-7).
Definition at line 62 of file liquid.hpp.
Referenced by wowlib::formats::adt::MH2OData::read(), and wowlib::formats::adt::MH2OData::write().