wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
Loading...
Searching...
No Matches
wowlib::formats::m2::skin::detail::M2SkinProfile< V > Struct Template Reference

One LOD view: local vertex/bone lookups into the model, submeshes and render batches; embedded in the model pre-WotLK, an own .skin file after. More...

#include <wowlib/formats/m2/skin/records.hpp>

Inheritance diagram for wowlib::formats::m2::skin::detail::M2SkinProfile< V >:

Public Member Functions

void validateExtra (ValidationReport &report) const
 Validation hook (see formats::detail::validateValue): the submesh and batch slices the annotations cannot express.
bool operator== (const M2SkinProfile &) const =default
Public Member Functions inherited from wowlib::formats::m2::skin::M2SkinProfileBase
bool operator== (const M2SkinProfileBase &) const =default

Public Attributes

std::vector< std::uint16_t > vertices
 Local -> global vertex lookup.
std::vector< std::uint16_t > indices
 Triangle list into the local vertices.
std::vector< std::array< std::uint8_t, 4 > > bones
 Per-vertex 4-bone indices.
std::vector< skin::M2SkinSection< V > > submeshes
 The submeshes (skin sections).
std::vector< M2Batch > batches
 The render batches (texture units).
std::uint32_t boneCountMax = 0
 Max bones per draw call (21/53/64/256).
std::vector< M2ShadowBatch > shadowBatches
 Shadow batches (Cata+).

Detailed Description

template<ClientVersion V>
struct wowlib::formats::m2::skin::detail::M2SkinProfile< V >

One LOD view: local vertex/bone lookups into the model, submeshes and render batches; embedded in the model pre-WotLK, an own .skin file after.

Definition at line 190 of file records.hpp.

Member Function Documentation

◆ operator==()

template<ClientVersion V>
bool wowlib::formats::m2::skin::detail::M2SkinProfile< V >::operator== ( const M2SkinProfile< V > & ) const
default

◆ validateExtra()

template<ClientVersion V>
void wowlib::formats::m2::skin::detail::M2SkinProfile< V >::validateExtra ( ValidationReport & report) const
inline

Validation hook (see formats::detail::validateValue): the submesh and batch slices the annotations cannot express.

Contracts reaching into the MODEL (batch material/color/texture-combo indices, a submesh's bone-lookup slice) belong to the M2 assembly's validate(), which is where both sides exist.

A submesh's index slice starts at indexStart + (level << 16) — the level field extends the 16-bit start, since index lists outgrow 64k before vertex lists do.

Parameters
reportthe report findings land in.

Definition at line 222 of file records.hpp.

Member Data Documentation

◆ batches

The render batches (texture units).

Definition at line 204 of file records.hpp.

◆ boneCountMax

template<ClientVersion V>
std::uint32_t wowlib::formats::m2::skin::detail::M2SkinProfile< V >::boneCountMax = 0

Max bones per draw call (21/53/64/256).

Definition at line 206 of file records.hpp.

◆ bones

template<ClientVersion V>
std::vector<std::array<std::uint8_t, 4> > wowlib::formats::m2::skin::detail::M2SkinProfile< V >::bones

Per-vertex 4-bone indices.

Definition at line 198 of file records.hpp.

◆ indices

template<ClientVersion V>
std::vector<std::uint16_t> wowlib::formats::m2::skin::detail::M2SkinProfile< V >::indices

Triangle list into the local vertices.

Definition at line 195 of file records.hpp.

◆ shadowBatches

Shadow batches (Cata+).

Definition at line 210 of file records.hpp.

◆ submeshes

The submeshes (skin sections).

Definition at line 202 of file records.hpp.

◆ vertices

template<ClientVersion V>
std::vector<std::uint16_t> wowlib::formats::m2::skin::detail::M2SkinProfile< V >::vertices

Local -> global vertex lookup.

Definition at line 192 of file records.hpp.


The documentation for this struct was generated from the following file: