template<FieldWidth WIDTH = FieldWidth:: Scalar>
CAnimLayer struct
Temporal overlay layers applied on top of CAnimBase (2 slots).
LayerConfig packing per slot:
bits 0-7 : skeleton layer ID — indexes SkeletonAsset::layers[] for the bone mask bit 8 : blend mode (0 = replace masked bones, 1 = additive) bit 9 : loop
Timestamps advance unconditionally via the wide sweep; AnimConstruct handles loop wrapping.
Base classes
Public static variables
- static uint32_t Slots constexpr
Public static functions
- static auto MakeConfig(uint8_t layerID, bool additive, bool loops) -> uint32_t
- Pack a LayerConfig word from its constituent fields.
- static auto GetLayerID(uint32_t cfg) -> uint8_t
- static auto IsAdditive(uint32_t cfg) -> bool
- static auto GetLoop(uint32_t cfg) -> bool
Constructors, destructors, conversion operators
- TNX_TEMPORAL_FIELDS(CAnimLayer, Render, LayerAnimID0, LayerAnimID1, LayerTimestamp0, LayerTimestamp1, LayerAlpha0, LayerAlpha1, LayerConfig0, LayerConfig1) UIntProxy< WIDTH > LayerAnimID0
Public functions
- auto GetTimestamp(uint32_t slot) const -> SimFloat
- auto GetAlpha(uint32_t slot) const -> SimFloat
- auto GetAnimID(uint32_t slot) const -> uint32_t
- auto GetConfig(uint32_t slot) const -> uint32_t
- void SetLayer(uint32_t slot, uint32_t animID, SimFloat startTime, SimFloat alpha, uint8_t layerID, bool additive, bool loops)
- Write all fields for
slotatomically; use ClearSlot() to deactivate. - void SetTimestamp(uint32_t slot, SimFloat t)
- void SetAlpha(uint32_t slot, SimFloat alpha)
- void ClearSlot(uint32_t slot)
- void Clear()
Public variables
- LayerAnimID1
- FloatProxy<WIDTH> LayerTimestamp0
- FloatProxy<WIDTH> LayerTimestamp1
- FloatProxy<WIDTH> LayerAlpha0
- FloatProxy<WIDTH> LayerAlpha1
- UIntProxy<WIDTH> LayerConfig0
- UIntProxy<WIDTH> LayerConfig1