Class GraphClip
Namespace: ValveResourceFormat.ResourceTypes.ModelAnimation2
Assembly: ValveResourceFormat.dll
An animation clip bound to a graph data slot, sampleable into a parent-space pose on the graph's NM skeleton. Each clip has its own frame cache because AnimationFrameCache caches by frame index without keying on the animation.
public class GraphClipInheritance
object ← GraphClip
Constructors
GraphClip(ClipAnimation, Skeleton)
Wraps a clip for sampling on a skeleton.
public GraphClip(ClipAnimation animation, Skeleton skeleton)Parameters
animation ClipAnimation
skeleton Skeleton
Properties
Animation
The clip animation backing this slot.
public ClipAnimation Animation { get; }Property Value
Duration
The duration of the clip in seconds.
public float Duration { get; }Property Value
float
FrameCount
The number of frames in the clip.
public int FrameCount { get; }Property Value
int
RootMotion
The clip's root motion track.
public RootMotionData RootMotion { get; }Property Value
SyncTrack
The clip's sync track, used to align it with other clips.
public SyncTrack SyncTrack { get; }Property Value
Methods
GetFrameTime(float)
Converts a percentage through the clip into a frame time.
public FrameTime GetFrameTime(float percentageThrough)Parameters
percentageThrough float
Returns
GetPercentageThrough(int)
The percentage through the clip at which a frame starts.
public float GetPercentageThrough(int frameIndex)Parameters
frameIndex int
Returns
float
GetRootMotionDelta(float, float)
The root motion delta for a time range; handles a single loop.
public FrameBone GetRootMotionDelta(float fromTime, float toTime)Parameters
fromTime float
toTime float
Returns
GetRootMotionDeltaNoLooping(float, float)
The root motion delta for a time range that does not loop.
public FrameBone GetRootMotionDeltaNoLooping(float fromTime, float toTime)Parameters
fromTime float
toTime float
Returns
SamplePoseAtFrame(int, FrameBone[])
Samples the clip at an exact frame index into a parent-space pose.
public void SamplePoseAtFrame(int frameIndex, FrameBone[] pose)Parameters
frameIndex int
pose FrameBone[]
SamplePoseAtPercentage(float, FrameBone[])
Samples the clip at a normalized time in [0, 1] into a parent-space pose.
public Frame SamplePoseAtPercentage(float cycle, FrameBone[] pose)Parameters
cycle float
pose FrameBone[]

