13#include <welder/vocabulary.hpp>
22# define WOWLIB_EMPTY_BASES __declspec(empty_bases)
24# define WOWLIB_EMPTY_BASES
31 "A 2D float vector: texture coordinates, UV animation speeds.")
33 [[=welder::doc(
"The x component.")]]
35 [[=welder::doc(
"The y component.")]]
43 =welder::doc(
"A 2D integer vector.")
45 [[=welder::doc(
"The x component.")]]
47 [[=welder::doc(
"The y component.")]]
55 =welder::doc(
"A 3D float vector — the workhorse: positions, normals, "
56 "rotations-as-Euler-degrees in placements.")
58 [[=welder::doc(
"The x component.")]]
60 [[=welder::doc(
"The y component.")]]
62 [[=welder::doc(
"The z component.")]]
70 =welder::doc(
"A 3D integer vector.")
72 [[=welder::doc(
"The x component.")]]
74 [[=welder::doc(
"The y component.")]]
76 [[=welder::doc(
"The z component.")]]
84 =welder::doc(
"A 4D float vector.")
86 [[=welder::doc(
"The x component.")]]
88 [[=welder::doc(
"The y component.")]]
90 [[=welder::doc(
"The z component.")]]
92 [[=welder::doc(
"The w component.")]]
101 A quaternion with the scalar part LAST on disk (x, y, z, w) — note the
102 difference from math libraries that lead with w.)")
104 [[=welder::doc("The x component.")]]
106 [[=welder::doc(
"The y component.")]]
108 [[=welder::doc(
"The z component.")]]
110 [[=welder::doc(
"The w (scalar) component.")]]
118 =welder::doc(
"A 3x3 matrix as three column C3Vectors.")
120 [[=welder::doc(
"The three columns.")]]
121 std::array<C3Vector, 3>
columns{};
123 bool operator==(
const C33Matrix&)
const =
default;
128 =welder::doc(
"A 3x4 matrix as four column C3Vectors.")
130 [[=welder::doc(
"The four columns.")]]
131 std::array<C3Vector, 4> columns{};
133 bool operator==(
const C34Matrix&)
const =
default;
138 =welder::doc(
"A 4x4 matrix as four column C4Vectors.")
140 [[=welder::doc(
"The four columns.")]]
141 std::array<C4Vector, 4> columns{};
143 bool operator==(
const C44Matrix&)
const =
default;
149 "A plane as a normal and its signed distance from the origin.")
151 [[=welder::doc(
"The plane normal.")]]
153 [[=welder::doc(
"The signed distance from the origin.")]]
161 =welder::doc(
"An axis-aligned bounding box: minimum and maximum corners.")
163 [[=welder::doc(
"The minimum corner.")]]
165 [[=welder::doc(
"The maximum corner.")]]
173 =welder::doc(
"An axis-aligned sphere: position and radius.")
175 [[=welder::doc(
"The center position.")]]
177 [[=welder::doc(
"The radius.")]]
185 =welder::doc(
"A float range: minimum and maximum.")
187 [[=welder::doc(
"The minimum.")]]
189 [[=welder::doc(
"The maximum.")]]
192 bool operator==(
const CRange&)
const =
default;
197 =welder::doc(
"A color stored as r, g, b, a bytes.")
199 [[=welder::doc(
"The red component.")]]
201 [[=welder::doc(
"The green component.")]]
203 [[=welder::doc(
"The blue component.")]]
205 [[=welder::doc(
"The alpha component.")]]
208 bool operator==(
const CArgb&)
const =
default;
214 "A color stored as b, g, r, a bytes — the client's immediate-mode "
215 "vertex color layout (WMO MOCV, doodad colors).")
217 [[=welder::doc(
"The blue component.")]]
219 [[=welder::doc(
"The green component.")]]
221 [[=welder::doc(
"The red component.")]]
223 [[=welder::doc(
"The alpha component.")]]
226 bool operator==(
const CImVector&)
const =
default;
232 "A signed 16-bit fixed-point value with an implicit 0x7FFF scale.")
234 [[=welder::doc(
"The raw fixed-point integer; value / 0x7FFF is the float.")]
236 std::int16_t value = 0;
239 =welder::doc(
"The value as a float in [-1, 1].")]]
240 constexpr float asFloat()
const {
241 return static_cast<float>(value) / 0x7FFF;
244 bool operator==(
const fixed16&)
const =
default;
247 static_assert(
sizeof(
C2Vector) == 8);
249 static_assert(
sizeof(
C3Vector) == 12);
251 static_assert(
sizeof(
C4Vector) == 16);
256 static_assert(
sizeof(
C4Plane) == 16);
257 static_assert(
sizeof(
CAaBox) == 24);
259 static_assert(
sizeof(
CRange) == 8);
260 static_assert(
sizeof(
CArgb) == 4);
262 static_assert(
sizeof(
fixed16) == 2);