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);
        }
示例#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;
 }
 public bool SetAnimationTrack(int track, MD5Animation animation)
 {
     return(SetAnimationTrack(track, animation, MD5AnimationRepeatSetting.Looping, 1));
 }
 public bool SetAnimationTrack(int track, MD5Animation animation, MD5AnimationRepeatSetting repeat)
 {
     return(SetAnimationTrack(track, animation, repeat, 1));
 }