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); }
public RotationAnimator(M2Animator <Quaternion16, Quaternion> anim) { Animator = anim; }
public PositionAnimator(M2Animator <SlimDX.Vector3, Vector3> anim) { Animator = anim; }
public AlphaAnimator(M2Animator <short, short> Alphas) { AlphaGen = Alphas; }
public ColorAnimator(M2Animator <Vector3, Vector3> Colors, M2Animator <short, short> Alphas) { Colorer = Colors; AlphaGen = Alphas; }