wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
Loading...
Searching...
No Matches
wowlib::formats::m2::detail Namespace Reference

A shared model skeleton (.skel, 7.3+): the bones, attachments and sequences a skel-based model moved out of its MD20 image, plus the satellite ids. More...

Classes

struct  AssemblyLegion
 legion+ assembly members: the chunk stream and the satellites it references. More...
struct  AssemblyLegion< V >
struct  AssemblySkins
 WotLK+ assembly members: the external .skin LOD views baked in. More...
struct  AssemblySkins< V >
struct  M2
 A whole M2 model for one client version: the MD20 body plus every baked-in satellite. More...
struct  SkelAttachments
 The SKA1 payload: the attachments that moved out of the model (external sequences' track data lives in the .anim AFSA chunks). More...
struct  SkelBones
 The SKB1 payload: the bones that moved out of the model (external sequences' track data lives in the .anim AFSB chunks). More...
struct  Skeleton
struct  SkelHeader
 The SKL1 payload: the skeleton's identity. More...
struct  SkelSequences
 The SKS1 payload: the sequence set that moved out of the model. More...

Functions

template<typename Profile, typename Root>
void validateProfileAgainstRoot (const Profile &profile, const Root &root, ValidationReport &report)
 Check one skin profile's references INTO the model body — the half of a skin's contracts that needs both files: the local->global vertex lookup and the lookup-table slices every render batch and submesh addresses.

Detailed Description

A shared model skeleton (.skel, 7.3+): the bones, attachments and sequences a skel-based model moved out of its MD20 image, plus the satellite ids.

Load with read(fs, key) — it follows the SKPD parent link for shared AFID/BFID and decodes SKB1/SKA1 through the .anim files; the ChunkedFile read(span) alone leaves those two as raw blobs.

Writing standalone regenerates the .skel and its .anim files with the AFSA/AFSB sections only — a paired model's AFM2 (event) section is restored by the owning M2's write, which is the full-fidelity save path.

Template Parameters
Vthe client version this skeleton targets.
See also
https://wowdev.wiki/M2/.skel

Function Documentation

◆ validateProfileAgainstRoot()

template<typename Profile, typename Root>
void wowlib::formats::m2::detail::validateProfileAgainstRoot ( const Profile & profile,
const Root & root,
ValidationReport & report )

Check one skin profile's references INTO the model body — the half of a skin's contracts that needs both files: the local->global vertex lookup and the lookup-table slices every render batch and submesh addresses.

A profile's self-contained contracts (submesh ranges, batch submesh indices) are its own validateExtra.

Parameters
profilethe LOD view's tables.
rootthe model body the profile refers into.
reportthe report findings land in.

Definition at line 799 of file m2.hpp.

References wowlib::formats::ValidationReport::addError(), wowlib::formats::ValidationReport::full(), wowlib::formats::detail::isNoIndex(), wowlib::formats::detail::validateIndexElements(), and validateProfileAgainstRoot().

Referenced by wowlib::formats::m2::detail::M2< V >::validate(), and validateProfileAgainstRoot().