Table of Contents

Class AnimationSegmentDecoder

Namespace
ValveResourceFormat.ResourceTypes.ModelAnimation
Assembly
ValveResourceFormat.dll

Base class for animation segment decoders that read compressed animation data.

public abstract class AnimationSegmentDecoder

Inheritance

Derived

Inherited Members

Properties

ChannelAttribute

Gets the channel attribute type.

public AnimationChannelAttribute ChannelAttribute { get; }

Property Value

AnimationChannelAttribute

Data

Gets the raw animation data segment.

protected ArraySegment<byte> Data { get; }

Property Value

ArraySegment<byte>

ElementCount

Gets the total number of elements in the segment.

protected int ElementCount { get; }

Property Value

int

RemapTable

Gets the remap table for mapping elements to bones or flex controllers.

public int[] RemapTable { get; }

Property Value

int[]

WantedElements

Gets the array of element indices to decode.

protected int[] WantedElements { get; }

Property Value

int[]

Methods

Initialize(ArraySegment<byte>, int[], int[], AnimationChannelAttribute, int)

Initializes the decoder with data and mapping information.

public void Initialize(ArraySegment<byte> data, int[] wantedElements, int[] remapTable, AnimationChannelAttribute channelAttribute, int elementCount = 1)

Parameters

data ArraySegment<byte>
wantedElements int[]
remapTable int[]
channelAttribute AnimationChannelAttribute
elementCount int

Read(int, Frame)

Reads and decodes animation data for a specific frame.

public abstract void Read(int frameIndex, Frame outFrame)

Parameters

frameIndex int

The index of the frame to read.

outFrame Frame

The frame object to populate with decoded data.