public Animations.AnimatableProperty <Transforms.SparseWeight8> UseMorphing() { if (_Morphings == null) { _Morphings = new Animations.AnimatableProperty <Transforms.SparseWeight8>(); _Morphings.Value = default; } return(_Morphings); }
public Animations.AnimatableProperty <ArraySegment <float> > UseMorphing() { if (_Morphings == null) { _Morphings = new Animations.AnimatableProperty <ArraySegment <float> >(); _Morphings.Value = default; } return(_Morphings); }
public void SetMorphAnimation(Node dstNode, Animations.AnimatableProperty <Transforms.SparseWeight8> animation) { if (animation == null) { return; } var dstMesh = dstNode.Mesh; dstMesh.SetMorphWeights(default);
public Animations.AnimatableProperty <ArraySegment <float> > UseMorphing() { if (this is FixedTransformer) { throw new InvalidOperationException($"Internal {nameof(FixedTransformer)} does not support animations. Use {nameof(SceneBuilder.AddRigidMesh)}(MeshBuilder mesh, NodeBuilder node) to add an animatable instance"); } if (_Morphings == null) { _Morphings = new Animations.AnimatableProperty <ArraySegment <float> >(); _Morphings.Value = default; } return(_Morphings); }
public static void SetMorphAnimation(Node dstNode, Animations.AnimatableProperty <Transforms.SparseWeight8> animation) { if (animation == null) { return; } var dstMesh = dstNode.Mesh; dstMesh.SetMorphWeights(animation.Value); foreach (var t in animation.Tracks) { dstNode.WithMorphingAnimation(t.Key, t.Value); } }
public static void SetMorphAnimation(Node dstNode, Animations.AnimatableProperty <Transforms.SparseWeight8> animation) { Guard.NotNull(dstNode, nameof(dstNode)); Guard.NotNull(dstNode.Mesh, nameof(dstNode.Mesh), "call after IOperator.ApplyTo"); if (animation == null) { return; } var dstMesh = dstNode.Mesh; dstMesh.SetMorphWeights(animation.Value); foreach (var t in animation.Tracks) { dstNode.WithMorphingAnimation(t.Key, t.Value); } }