Exemplo n.º 1
0
        public bool SetAnimationTrack(int position, MD5Animation animation, MD5AnimationRepeatSetting repeat, int bias)
        {
            // Input track position is out of bounds
            if (position < 0 || position >= MAX_NUMBER_OF_TRACKS)
            {
                return(false);
            }


            // User wants to clear the animation on the input track
            if (animation == null)
            {
                animationTracks[position] = null;
                return(true);
            }

            MD5AnimationTrack track = new MD5AnimationTrack(position, this, animation, repeat, bias);

            // The animation isn't compatable with this model
            if (numberOfBones != track.NumberOfJoints)
            {
                return(false);
            }

            // Everything is a-ok
            animationTracks[position] = track;
            return(true);
        }
Exemplo n.º 2
0
 public MD5AnimationTrack(int position, MD5AnimationController parent, MD5Animation animation, MD5AnimationRepeatSetting looping, int bias)
 {
     this.trackPosition = position;
     this.parent        = parent;
     this.animation     = animation;
     this.looping       = looping;
     this.bias          = bias;
 }
Exemplo n.º 3
0
 public bool SetAnimationTrack(int track, MD5Animation animation)
 {
     return(SetAnimationTrack(track, animation, MD5AnimationRepeatSetting.Looping, 1));
 }
Exemplo n.º 4
0
 public bool SetAnimationTrack(int track, MD5Animation animation, MD5AnimationRepeatSetting repeat)
 {
     return(SetAnimationTrack(track, animation, repeat, 1));
 }