コード例 #1
0
        public M2AnimationBone(M2Bone bone, M2BoneAnimator Anim, Stormlib.MPQFile f, uint[] gs, Stormlib.MPQFile[] Anims)
        {
            Animator = Anim;
            fileInfo = bone;
            var ap = new M2Animator <Vector3, Vector3>(fileInfo.Translation, f, gs, Anims);

            ap.Load();
            ap.SelectedAnim = 0;
            AnimPos         = new PositionAnimator(ap);
            AnimPos.MaxTime = TimeSpan.FromMilliseconds(Anim.Animations[0].Length);
            ap = new M2Animator <Vector3, Vector3>(fileInfo.Scaling, f, gs, Anims);
            ap.Load();
            ap.SelectedAnim   = 0;
            AnimScale         = new PositionAnimator(ap);
            AnimScale.Default = new Vector3(1, 1, 1);
            AnimScale.MaxTime = TimeSpan.FromMilliseconds(Anim.Animations[0].Length);
            var ar = new M2Animator <Quaternion16, Quaternion>(fileInfo.Rotation, f, gs, Anims);

            ar.Load();
            ar.SelectedAnim = 0;
            AnimRot         = new RotationAnimator(ar);
            AnimRot.MaxTime = TimeSpan.FromMilliseconds(Anim.Animations[0].Length);
        }
コード例 #2
0
 public RotationAnimator(M2Animator <Quaternion16, Quaternion> anim)
 {
     Animator = anim;
 }
コード例 #3
0
 public PositionAnimator(M2Animator <SlimDX.Vector3, Vector3> anim)
 {
     Animator = anim;
 }
コード例 #4
0
 public AlphaAnimator(M2Animator <short, short> Alphas)
 {
     AlphaGen = Alphas;
 }
コード例 #5
0
 public ColorAnimator(M2Animator <Vector3, Vector3> Colors, M2Animator <short, short> Alphas)
 {
     Colorer  = Colors;
     AlphaGen = Alphas;
 }