Class SampledEventsBuffer
Namespace: ValveResourceFormat.Animation
Assembly: ValveResourceFormat.dll
Append-only buffer of the events sampled during one graph update. Nodes record the range they appended so conditions can restrict their search to a source state's events.
public class SampledEventsBufferInheritance
object ← SampledEventsBuffer
Properties
Count
The number of events.
public int Count { get; }Property Value
int
this[int]
Gets the event at an index.
public SampledEvent this[int index] { get; }Property Value
Methods
AppendFrom(SampledEventsBuffer)
Appends all of another buffer's events, e.g. to surface a child graph's events to its parent.
public void AppendFrom(SampledEventsBuffer other)Parameters
other SampledEventsBuffer
BlendEventRanges(SampledEventRange, SampledEventRange, float)
Scales the weights of two consecutive event ranges by their blend weights and returns the combined range.
public SampledEventRange BlendEventRanges(SampledEventRange range0, SampledEventRange range1, float blendWeight)Parameters
range0 SampledEventRange
range1 SampledEventRange
blendWeight float
Returns
Clear()
Removes all events.
public void Clear()EmplaceAnimationEvent(short, Event, float, bool, float)
Appends an animation event sampled from a clip.
public void EmplaceAnimationEvent(short sourceNodeIdx, Event animEvent, float percentageThrough, bool isFromActiveBranch, float weight = 1)Parameters
sourceNodeIdx short
animEvent Event
percentageThrough float
isFromActiveBranch bool
weight float
EmplaceGraphEvent(short, GraphEventType, StringToken, bool, float)
Appends a graph event.
public void EmplaceGraphEvent(short sourceNodeIdx, GraphEventType type, StringToken id, bool isFromActiveBranch, float weight = 1)Parameters
sourceNodeIdx short
type GraphEventType
id StringToken
isFromActiveBranch bool
weight float
EnsureCapacity(int)
Ensures the buffer can hold at least the given number of events.
public void EnsureCapacity(int capacity)Parameters
capacity int
MarkEventsAsFromInactiveBranch(SampledEventRange)
Marks every event in the range as coming from an inactive branch.
public void MarkEventsAsFromInactiveBranch(SampledEventRange range)Parameters
range SampledEventRange
MarkEventsAsIgnored(SampledEventRange)
Marks every event in the range as ignored.
public void MarkEventsAsIgnored(SampledEventRange range)Parameters
range SampledEventRange
RemoveAt(int)
Removes the event at an index.
public void RemoveAt(int index)Parameters
index int
UpdateWeights(SampledEventRange, float)
Scales the weight of every event in the range.
public void UpdateWeights(SampledEventRange range, float weightMultiplier)Parameters
range SampledEventRange
weightMultiplier float

