Table of Contents

Class Frame

Namespace
ValveResourceFormat.ResourceTypes.ModelAnimation
Assembly
ValveResourceFormat.dll

Represents a single frame of animation data.

public class Frame

Inheritance

Inherited Members

Constructors

Frame(Skeleton, FlexController[])

Initializes a new instance of the ValveResourceFormat.ResourceTypes.ModelAnimation.Frame class.

public Frame(Skeleton skeleton, FlexController[] flexControllers)

Parameters

skeleton Skeleton
flexControllers FlexController[]

Properties

Bones

Gets the bone transforms for this frame.

public FrameBone[] Bones { get; }

Property Value

FrameBone[]

Datas

Gets the flex controller data for this frame.

public float[] Datas { get; }

Property Value

float[]

FrameIndex

Gets or sets the frame index.

public int FrameIndex { get; set; }

Property Value

int

Movement

Gets or sets the movement data for this frame.

public AnimationMovement.MovementData Movement { get; set; }

Property Value

AnimationMovement.MovementData

Methods

Clear(Skeleton)

Resets frame bones to their bind pose. Should be used on animation change.

public void Clear(Skeleton skeleton)

Parameters

skeleton Skeleton

The same skeleton that was passed to the constructor.

SetAttribute(int, AnimationChannelAttribute, Vector3)

Sets a Vector3 attribute for a bone in this frame.

public void SetAttribute(int bone, AnimationChannelAttribute attribute, Vector3 data)

Parameters

bone int
attribute AnimationChannelAttribute
data Vector3

SetAttribute(int, AnimationChannelAttribute, Quaternion)

Sets a Quaternion attribute for a bone in this frame.

public void SetAttribute(int bone, AnimationChannelAttribute attribute, Quaternion data)

Parameters

bone int
attribute AnimationChannelAttribute
data Quaternion

SetAttribute(int, AnimationChannelAttribute, float)

Sets a float attribute for a bone or flex controller in this frame.

public void SetAttribute(int bone, AnimationChannelAttribute attribute, float data)

Parameters

bone int
attribute AnimationChannelAttribute
data float