5 using SiliconStudio.Core;
6 using SiliconStudio.Core.Extensions;
7 using SiliconStudio.Core.Mathematics;
8 using SiliconStudio.Core.Serialization;
9 using SiliconStudio.Core.Serialization.Converters;
10 using SiliconStudio.Paradox.DataModel;
11 using SiliconStudio.Paradox.Effects;
13 namespace SiliconStudio.
Paradox.Engine
21 internal float[] NodeFactors;
29 BlendOperation = AnimationBlendOperation.LinearBlend;
31 Clip = animationComponent.Animations[name];
32 RepeatMode = Clip.RepeatMode;
57 public float Weight {
get; set; }
59 public string Name {
get;
private set; }
69 public TimeSpan CurrentTime {
get; set; }
77 public float TimeFactor {
get; set; }
85 public bool IsPlaying {
get; set; }
88 public float WeightTarget {
get; set; }
89 public TimeSpan RemainingTime {
get; set; }
99 var nodeFactors =
new float[nodes.Length];
100 for (
int index = 0; index < nodes.Length; index++)
102 var node = nodes[index];
103 if (roots.Contains(node.Name)
104 || (node.ParentIndex != -1 && nodeFactors[node.ParentIndex] == 1.0f))
106 nodeFactors[index] = 1.0f;
111 var blenderChannels = Evaluator.BlenderChannels;
112 var channels = Evaluator.Channels.Items;
113 for (
int index = 0; index < blenderChannels.Count; index++)
115 var blenderChannel = blenderChannels[index];
118 var nodeName = MeshAnimationUpdater.GetNodeName(blenderChannel.PropertyName);
119 var nodeIndex = nodes.IndexOf(x => x.Name == nodeName);
124 channels[index].Factor *= nodeFactors[nodeIndex];
void FilterNodes(ModelNodeDefinition[] nodes, params string[] roots)
Filters the animation to the specified sub-trees given by roots.
AnimationBlendOperation
Describes the type of animation blend operation.
Add animation capabilities to an Entity. It will usually apply to ModelComponent.ModelViewHierarchy ...
An aggregation of AnimationCurve with their channel names.
AnimationRepeatMode
Enumeration describing how an animation should be repeated.
Describes a single transformation node, usually in a Model node hierarchy.
Evaluates AnimationClip to a AnimationClipResult at a given time.