Ejemplo n.º 1
0
 public FlyToOrbitViewAnimator(OrbitView orbitView, Interpolator interpolator, int altitudeMode,
                               PositionAnimator centerAnimator, DoubleAnimator zoomAnimator,
                               AngleAnimator headingAnimator, AngleAnimator pitchAnimator, AngleAnimator rollAnimator) :
     base(interpolator, centerAnimator, zoomAnimator, headingAnimator, pitchAnimator, rollAnimator)
 {
     this.orbitView       = (BasicOrbitView)orbitView;
     this.centerAnimator  = centerAnimator;
     this.zoomAnimator    = (ViewElevationAnimator)zoomAnimator;
     this.headingAnimator = headingAnimator;
     this.pitchAnimator   = pitchAnimator;
     this.rollAnimator    = rollAnimator;
     if (interpolator == null)
     {
         this.interpolator = new ScheduledInterpolator(10000);
     }
     this.altitudeMode = altitudeMode;
 }
Ejemplo n.º 2
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);
 }