wowlib
0.0.0
Read & write World of Warcraft client files — a C++26 core
Toggle main menu visibility
Loading...
Searching...
No Matches
objects.hpp
Go to the documentation of this file.
1
#pragma once
2
9
10
#include <cstdint>
11
12
#include <welder/vocabulary.hpp>
13
14
#include <
wowlib/formats/common/map_placements.hpp
>
15
#include <
wowlib/formats/common/types.hpp
>
16
17
namespace
wowlib::formats::wdl::chunks
{
18
struct
[[
19
=welder::weld,
20
=welder::doc(R
"(
21
A low-resolution WMO placement (an MLMD record, Legion+): an
22
SMMapObjDef without the extents — those live in the parallel MLMX
23
record. name_id is always a FileDataID here (the WDL has no name
24
table).)")
25
]]
LodMapObjDef
{
26
[[=welder::doc(
"The WMO FileDataID."
)]]
27
std::uint32_t
nameId
= 0;
28
29
[[=welder::doc(
"Unique instance id across the whole map; matches the full-"
30
"resolution ADT placement."
)]]
31
std::uint32_t
uniqueId
= 0;
32
33
[[=welder::doc(
"Position, in the map's placement coordinate system."
)]]
34
C3Vector
position
{};
35
36
[[=welder::doc(
"Rotation as Euler angles, degrees."
)]]
37
C3Vector
rotation
{};
38
39
[[=welder::doc(
"Flags; MapObjDefFlags bits."
)]]
40
common::MapObjDefFlags
flags
{};
41
42
[[=welder::doc(
"The WMO doodad set shown by this instance."
)]]
43
std::uint16_t
doodadSet
= 0;
44
45
[[=welder::doc(
"The WMO name set."
)]]
46
std::uint16_t nameSet = 0;
47
48
[[=welder::doc(
"Scale, 1024 = 1.0."
)]]
49
std::uint16_t scale = 0;
50
};
51
52
static_assert
(
sizeof
(
LodMapObjDef
) == 0x28);
53
54
struct
[[
55
=welder::weld,
56
=welder::doc(R
"(
57
Visibility extents for one low-resolution placement (an MLDX/MLMX
58
record, Legion+): the transformed model's bounding box and a radius,
59
in server coordinates. Same count and order as the placement list it
60
accompanies.)")
61
]]
LodExtent
{
62
[[=welder::doc(
"The transformed model's bounding box."
)]]
63
CAaBox
bounds{};
64
65
[[=welder::doc(
"The visibility radius."
)]]
66
float
radius = 0;
67
};
68
69
static_assert
(
sizeof
(
LodExtent
) == 28);
70
71
struct
[[
72
=welder::weld,
73
=welder::doc(R
"(
74
A fade-distance range for one low-resolution M2 placement (an MLDF
75
record, BfA): undocumented on wowdev; layout established by surveying
76
every 8.3.7 WDL carrying the chunk (33 files) — always exactly one
77
8-byte record per MLDD entry, holding a pair of ascending distances
78
drawn from clean round values ((500, 3500), (3500, 4000),
79
(5000, 5050), (10000, 10050)).)")
80
]]
LodDoodadFade
{
81
[[=welder::doc(
"The distance the fade starts at."
)]]
82
float
fadeStart = 0;
83
84
[[=welder::doc(
"The distance the fade ends at."
)]]
85
float
fadeEnd = 0;
86
};
87
88
static_assert
(
sizeof
(
LodDoodadFade
) == 8);
89
}
map_placements.hpp
The map-placement binary records SHARED across the world file formats (namespace wowlib::formats::com...
wowlib::formats::common::MapObjDefFlags
MapObjDefFlags
WMO placement flag bits (SMMapObjDef.flags).
Definition
map_placements.hpp:18
wowlib::formats::wdl::chunks
WDL chunk binary structs (per-tile heightmaps, hole and ocean masks, low-resolution placements,...
Definition
objects.hpp:17
wowlib::formats::common::C3Vector
A 3D float vector — the workhorse: positions, normals, rotations-as-Euler-degrees in placements.
Definition
types.hpp:49
wowlib::formats::common::CAaBox
An axis-aligned bounding box: minimum and maximum corners.
Definition
types.hpp:134
wowlib::formats::wdl::chunks::LodDoodadFade
Definition
objects.hpp:56
wowlib::formats::wdl::chunks::LodDoodadFade::fadeStart
float fadeStart
The distance the fade starts at.
Definition
objects.hpp:58
wowlib::formats::wdl::chunks::LodDoodadFade::fadeEnd
float fadeEnd
The distance the fade ends at.
Definition
objects.hpp:61
wowlib::formats::wdl::chunks::LodExtent
Definition
objects.hpp:46
wowlib::formats::wdl::chunks::LodExtent::bounds
CAaBox bounds
The transformed model's bounding box.
Definition
objects.hpp:48
wowlib::formats::wdl::chunks::LodExtent::radius
float radius
The visibility radius.
Definition
objects.hpp:51
wowlib::formats::wdl::chunks::LodMapObjDef
Definition
objects.hpp:18
wowlib::formats::wdl::chunks::LodMapObjDef::flags
common::MapObjDefFlags flags
Flags; MapObjDefFlags bits.
Definition
objects.hpp:32
wowlib::formats::wdl::chunks::LodMapObjDef::position
C3Vector position
Position, in the map's placement coordinate system.
Definition
objects.hpp:26
wowlib::formats::wdl::chunks::LodMapObjDef::scale
std::uint16_t scale
Scale, 1024 = 1.0.
Definition
objects.hpp:41
wowlib::formats::wdl::chunks::LodMapObjDef::uniqueId
std::uint32_t uniqueId
Unique instance id across the whole map; matches the full-resolution ADT placement.
Definition
objects.hpp:23
wowlib::formats::wdl::chunks::LodMapObjDef::nameId
std::uint32_t nameId
The WMO FileDataID.
Definition
objects.hpp:20
wowlib::formats::wdl::chunks::LodMapObjDef::doodadSet
std::uint16_t doodadSet
The WMO doodad set shown by this instance.
Definition
objects.hpp:35
wowlib::formats::wdl::chunks::LodMapObjDef::nameSet
std::uint16_t nameSet
The WMO name set.
Definition
objects.hpp:38
wowlib::formats::wdl::chunks::LodMapObjDef::rotation
C3Vector rotation
Rotation as Euler angles, degrees.
Definition
objects.hpp:29
types.hpp
The binary-level math and color primitives shared across WoW file formats (wowdev....
src
wowlib
formats
wdl
chunks
objects.hpp
Generated by
1.17.0