wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
Loading...
Searching...
No Matches
track.hpp File Reference

The M2 animation vocabulary (namespace wowlib::formats::m2::root::record): the small fixed-size primitives (M2Range, M2Bounds, M2Loop, M2CompQuat, M2Box, M2SplineKey) and the track types every animated record embeds. More...

#include <algorithm>
#include <span>
#include <cstdint>
#include <format>
#include <utility>
#include <vector>
#include <welder/vocabulary.hpp>
#include <wowlib/core/lang.hpp>
#include <wowlib/core/client_version.hpp>
#include <wowlib/core/error.hpp>
#include <wowlib/formats/common/annotations.hpp>
#include <wowlib/formats/common/types.hpp>
#include <wowlib/formats/m2/boundaries.hpp>
Include dependency graph for track.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  wowlib::formats::m2::root::record::M2TrackFamilyBase< T >
 The version-agnostic base of every M2Track<T, V> VALUE FAMILY, one base per value type T (welded per family as "M2TrackC3Vector", ... — see the alias tables in bindings/instantiations/m2_ranges.hpp). More...
struct  wowlib::formats::m2::root::record::M2EventTrackBase
 The version-agnostic base of every M2EventTrack<V> (welded as "M2EventTrack"). More...
struct  wowlib::formats::m2::root::record::M2Range
 An inclusive u32 range: pre-WotLK track interpolation ranges, sequence replay bounds. More...
struct  wowlib::formats::m2::root::record::M2Bounds
 A bounding volume: axis-aligned extent plus sphere radius. More...
struct  wowlib::formats::m2::root::record::M2Loop
 A global-loop entry: the timestamp a global sequence wraps at. More...
struct  wowlib::formats::m2::root::record::M2CompQuat
 A quaternion compressed to i16 x, y, z, w (TBC+ bone rotations); decompress as (v < 0 ? More...
struct  wowlib::formats::m2::root::record::M2Box
 A model-space box: minimum and maximum corner vectors. More...
struct  wowlib::formats::m2::root::record::M2SplineKey< T >
 A spline keyframe: the value plus incoming/outgoing tangents (bezier/hermite camera tracks). More...
struct  wowlib::formats::m2::root::record::detail::M2Track< T, V >
 An animation track, pre-WotLK layout: one global timeline with per-sequence interpolation ranges. More...
struct  wowlib::formats::m2::root::record::detail::M2TrackBase< V >
struct  wowlib::formats::m2::root::record::FBlock< T >
struct  wowlib::formats::m2::root::record::M2PartTrack< T >

Namespaces

namespace  wowlib
namespace  wowlib::formats
namespace  wowlib::formats::m2
namespace  wowlib::formats::m2::root
 The MD20 model body (M2Root) with its per-version classes.
namespace  wowlib::formats::m2::root::record
 M2 body record structs (sequences, bones, tracks, textures, cameras, emitters) and their flag enums.
namespace  wowlib::formats::m2::root::record::detail

Typedefs

template<typename T, ClientVersion V>
using wowlib::formats::m2::root::record::M2Track
 An animation track for value type T — the canonicalizing face of detail::M2Track: every client version maps to its range's first grid version (M2TrackPivots), so one instantiation serves the whole range.
template<ClientVersion V>
using wowlib::formats::m2::root::record::M2TrackBase
 A timestamp-only event track — the canonicalizing face of detail::M2TrackBase (same two eras and pivots as M2Track).

Detailed Description

The M2 animation vocabulary (namespace wowlib::formats::m2::root::record): the small fixed-size primitives (M2Range, M2Bounds, M2Loop, M2CompQuat, M2Box, M2SplineKey) and the track types every animated record embeds.

Tracks are offset records — the serializer recurses into them inline at the record cursor; their arrays live in blocks behind M2Array references.

Two track eras (M2PerSequenceTimelines pivot, MD20 v264 / WotLK): pre-WotLK tracks share ONE global timeline, sliced per sequence by interpolation ranges; WotLK+ tracks nest one timestamp/value array per sequence, and those inner arrays are SequenceData — a low-priority sequence's data lives in its .anim file, routed through the offset I/O contexts.

Definition in file track.hpp.