Esempio n. 1
0
        public AnimationSampler CreateSampler(Accessor input, Accessor output, AnimationInterpolationMode interpolation)
        {
            var sampler = new AnimationSampler(input, output, interpolation);

            _samplers.Add(sampler);

            return(sampler);
        }
Esempio n. 2
0
        /*
         * public AnimationSampler CreateSampler(IReadOnlyList<Single> input, IReadOnlyList<Single> output, AnimationInterpolationMode interpolation)
         * {
         *  var inputData = input.ToArray().ToByteArray();
         *  var outputData = output.ToArray().ToByteArray();
         *
         *  var inputAccessor = LogicalParent._CreateDataAccessor(inputData, Runtime.Encoding.DimensionType.Scalar, input.Count);
         *  var outputAccesor = LogicalParent._CreateDataAccessor(outputData, Runtime.Encoding.DimensionType.Scalar, output.Count);
         *
         *  return CreateSampler(inputAccessor, outputAccesor, interpolation);
         * }
         *
         * public AnimationSampler CreateSampler(IReadOnlyList<Single> input, IReadOnlyList<System.Numerics.Vector3> output, AnimationInterpolationMode interpolation)
         * {
         *  var inputData = input.ToArray().ToByteArray();
         *  var outputData = output.ToArray().ToByteArray();
         *
         *  var inputAccessor = LogicalParent._CreateDataAccessor(inputData, Runtime.Encoding.DimensionType.Scalar, input.Count);
         *  var outputAccesor = LogicalParent._CreateDataAccessor(outputData, Runtime.Encoding.DimensionType.Vector3, output.Count);
         *
         *  return CreateSampler(inputAccessor, outputAccesor, interpolation);
         * }
         *
         * public AnimationSampler CreateSampler(IReadOnlyList<Single> input, IReadOnlyList<System.Numerics.Quaternion> output, AnimationInterpolationMode interpolation)
         * {
         *  var inputData = input.ToArray().ToByteArray();
         *  var outputData = output.ToArray().ToByteArray();
         *
         *  var inputAccessor = LogicalParent._CreateDataAccessor(inputData, Runtime.Encoding.DimensionType.Scalar, input.Count);
         *  var outputAccesor = LogicalParent._CreateDataAccessor(outputData, Runtime.Encoding.DimensionType.Vector4, output.Count);
         *
         *  return CreateSampler(inputAccessor, outputAccesor, interpolation);
         * }*/

        public void AddChannel(Node node, PathType path, AnimationSampler sampler)
        {
            var channel = new AnimationChannel(node, path, sampler);

            _channels.Add(channel);
        }
Esempio n. 3
0
 public AnimationChannel(Node targetNode, PathType targetPath, AnimationSampler sampler)
 {
     _target  = new AnimationChannelTarget(targetNode, targetPath);
     _sampler = sampler.LogicalIndex;
 }