MakeTrack() public méthode

public MakeTrack ( ) : TransformTrack
Résultat TransformTrack
Exemple #1
0
        public void ImportAnimation(animation colladaAnim, Animation animation, TrackGroup trackGroup, Skeleton skeleton)
        {
            var childAnims = 0;

            foreach (var item in colladaAnim.Items)
            {
                if (item is animation)
                {
                    ImportAnimation(item as animation, animation, trackGroup, skeleton);
                    childAnims++;
                }
            }

            var duration = .0f;

            if (childAnims < colladaAnim.Items.Length)
            {
                ColladaAnimation importAnim = new ColladaAnimation();
                if (importAnim.ImportFromCollada(colladaAnim, skeleton))
                {
                    duration = Math.Max(duration, importAnim.Duration);
                    var track = importAnim.MakeTrack(Options.RemoveTrivialAnimationKeys);
                    trackGroup.TransformTracks.Add(track);
                }
            }

            animation.Duration = Math.Max(animation.Duration, duration);
        }
Exemple #2
0
        public void ImportAnimation(animation anim, TrackGroup trackGroup)
        {
            var childAnims = 0;

            foreach (var item in anim.Items)
            {
                if (item is animation)
                {
                    ImportAnimation(item as animation, trackGroup);
                    childAnims++;
                }
            }

            if (childAnims < anim.Items.Length)
            {
                ColladaAnimation collada = new ColladaAnimation();
                if (collada.ImportFromCollada(anim, Skeletons[0]))
                {
                    var track = collada.MakeTrack();
                    trackGroup.TransformTracks.Add(track);
                }
            }
        }