12#include <welder/vocabulary.hpp>
26 =welder::weld_as(
"M2Color"),
29 One color + alpha animation pair. Abstract over the client version; construct a concrete
30 version with M2Color.ForVersion / for_version.)")
42 =welder::weld_as(
"M2TextureWeight"),
45 One texture weight (transparency) track. Abstract over the client version; construct a concrete
46 version with M2TextureWeight.ForVersion / for_version.)")
58 =welder::weld_as(
"M2TextureFlipbook"),
61 One texture flipbook animation. Abstract over the client version; construct a concrete
62 version with M2TextureFlipbook.ForVersion / for_version.)")
74 =welder::weld_as(
"M2TextureTransform"),
77 One texture UV transform animation. Abstract over the client version; construct a concrete
78 version with M2TextureTransform.ForVersion / for_version.)")
86 =welder::doc(
"An M2 vertex: position, 4-bone weights/indices, normal and "
87 "two texture coordinate sets.")
89 [[=welder::doc(
"Position in model space.")]]
91 [[=welder::doc(
"Influence weights of the four bones; they sum to 255.")]]
92 std::array<std::uint8_t, 4> boneWeights{};
93 [[=welder::doc(
"The four influencing bone indices.")]]
94 std::array<std::uint8_t, 4> boneIndices{};
95 [[=welder::doc(
"Normal in model space.")]]
97 [[=welder::doc(
"Two UV sets; the shader picks which are used.")]]
98 std::array<C2Vector, 2> texCoords{};
108 =welder::doc(
"M2Material render flags.")
110 Unlit [[=welder::doc(
"No lighting.")]] = 0x1,
112 TwoSided [[=welder::doc(
"No backface culling.")]] = 0x4,
113 DepthTest [[=welder::doc(
"Depth test enabled.")]] = 0x8,
114 DepthWrite [[=welder::doc(
"Depth write enabled.")]] = 0x10,
116 "custom elements.")]] = 0x800
121 =welder::doc(
"An M2 material: render flags (see MaterialFlags) and the "
122 "blending mode (see M2/Rendering M2BLEND).")
124 [[=welder::doc(
"See MaterialFlags.")]]
126 [[=welder::doc(
"M2BLEND blending mode (see M2/Rendering).")]]
127 std::uint16_t blendingMode = 0;
136 =welder::doc(
"A texture definition: type 0 references the filename (TXID "
137 "FileDataIDs replace it in 8.0+); non-zero types are runtime component "
138 "slots (skin, hair, monster skins, ...).")
140 [[=welder::doc(
"0 = filename-referenced, else a component slot.")]]
141 std::uint32_t type = 0;
142 [[=welder::doc(
"0x1 wrap X, 0x2 wrap Y.")]]
143 std::uint32_t flags = 0;
145 "For type 0; the serializer writes the NUL inside the count.")]]
146 std::string filename;
154 template <ClientVersion V>
158 "A vertex color + alpha animation pair, referenced from skin batches "
161 [[=welder::doc(
"RGB vertex color.")]]
163 [[=welder::doc(
"0 transparent .. 0x7FFF opaque.")]]
166 bool operator==(
const M2Color&)
const =
default;
169 template <ClientVersion V>
172 =welder::doc(
"A global texture weight (transparency) track.")
174 [[=welder::doc(
"0 transparent .. 0x7FFF opaque; multiplies the color "
181 template <ClientVersion V>
185 "A pre-WotLK texture flipbook slot; never observed engaged in files.")
187 [[=welder::doc(
"Frame index keyframes.")]]
193 template <ClientVersion V>
197 "A UV animation: translation/rotation/scaling keyframes for the "
198 "texture matrix (rotation pivots at texture center 0.5, 0.5).")
200 [[=welder::doc(
"UV translation keyframes.")]]
202 [[=welder::doc(
"UV rotation keyframes, pivoting at the texture center.")]]
204 [[=welder::doc(
"UV scaling keyframes.")]]
213 template <ClientVersion V>
215 template <ClientVersion V>
217 template <ClientVersion V>
219 template <ClientVersion V>
Client version identity, the flavor axis that separates a client's CONTENT version from the engine ge...
Binding-language identities welder's core does not name.
#define WOWLIB_CS_FAMILY_SURFACE
The C# rod's family-surface opt-in, spellable in every build.
The M2 version vocabulary: the layout pivots record/entity partial specializations key on,...
The version-agnostic base of every M2TextureFlipbook<V> (welded as "M2TextureFlipbook").
bool operator==(const M2TextureFlipbookBase &) const =default
The version-agnostic base of every M2TextureTransform<V> (welded as "M2TextureTransform").
bool operator==(const M2TextureTransformBase &) const =default
The version-agnostic base of every M2TextureWeight<V> (welded as "M2TextureWeight").
bool operator==(const M2TextureWeightBase &) const =default
A texture definition: type 0 references the filename (TXID FileDataIDs replace it in 8....
std::uint32_t type
0 = filename-referenced, else a component slot.
std::string filename
For type 0; the serializer writes the NUL inside the count.
std::uint32_t flags
0x1 wrap X, 0x2 wrap Y.
bool operator==(const M2Texture &) const =default
A pre-WotLK texture flipbook slot; never observed engaged in files.
record::M2Track< std::uint16_t, V > frames
bool operator==(const M2TextureFlipbook &) const =default
A UV animation: translation/rotation/scaling keyframes for the texture matrix (rotation pivots at tex...
record::M2Track< C3Vector, V > scaling
bool operator==(const M2TextureTransform &) const =default
record::M2Track< C4Quaternion, V > rotation
record::M2Track< C3Vector, V > translation
A global texture weight (transparency) track.
bool operator==(const M2TextureWeight &) const =default
record::M2Track< fixed16, V > weight
The M2 animation vocabulary (namespace wowlib::formats::m2::root::record): the small fixed-size primi...