public void AnimateTo() { var animation = new Vector3FFromToByAnimation(); animation.From = null; animation.To = new Vector3F(2.0f, 20.0f, 200.0f); animation.By = null; Assert.AreEqual(new Vector3F(0.0f, 0.0f, 0.0f), animation.GetValue(TimeSpan.FromSeconds(0.0), new Vector3F(0.0f, 0.0f, 0.0f), new Vector3F(10.0f, 100.0f, 1000.0f))); Assert.AreEqual(new Vector3F(1.0f, 10.0f, 100.0f), animation.GetValue(TimeSpan.FromSeconds(0.5), new Vector3F(0.0f, 0.0f, 0.0f), new Vector3F(10.0f, 100.0f, 1000.0f))); Assert.AreEqual(new Vector3F(2.0f, 20.0f, 200.0f), animation.GetValue(TimeSpan.FromSeconds(1.0), new Vector3F(0.0f, 0.0f, 0.0f), new Vector3F(10.0f, 100.0f, 1000.0f))); }
public void ShouldIgnoreByIfToIsSet() { var animation = new Vector3FFromToByAnimation(); animation.From = null; animation.To = new Vector3F(4.0f, 40.0f, 400.0f); animation.By = new Vector3F(10.0f, 100.0f, 1000.0f); Assert.AreEqual(new Vector3F(0.0f, 0.0f, 0.0f), animation.GetValue(TimeSpan.FromSeconds(0.0), new Vector3F(0.0f, 0.0f, 0.0f), new Vector3F(10.0f, 100.0f, 1000.0f))); Assert.AreEqual(new Vector3F(2.0f, 20.0f, 200.0f), animation.GetValue(TimeSpan.FromSeconds(0.5), new Vector3F(0.0f, 0.0f, 0.0f), new Vector3F(10.0f, 100.0f, 1000.0f))); Assert.AreEqual(new Vector3F(4.0f, 40.0f, 400.0f), animation.GetValue(TimeSpan.FromSeconds(1.0), new Vector3F(0.0f, 0.0f, 0.0f), new Vector3F(10.0f, 100.0f, 1000.0f))); }
public void AnimateTo() { var animation = new Vector3FFromToByAnimation(); animation.From = null; animation.To = new Vector3F(2.0f, 20.0f, 200.0f); animation.By = null; Assert.AreEqual(new Vector3F(0.0f, 0.0f, 0.0f), animation.GetValue(TimeSpan.FromSeconds(0.0), new Vector3F(0.0f, 0.0f, 0.0f), new Vector3F(10.0f, 100.0f, 1000.0f))); Assert.AreEqual(new Vector3F(1.0f, 10.0f, 100.0f), animation.GetValue(TimeSpan.FromSeconds(0.5), new Vector3F(0.0f, 0.0f, 0.0f), new Vector3F(10.0f, 100.0f, 1000.0f))); Assert.AreEqual(new Vector3F(2.0f, 20.0f, 200.0f), animation.GetValue(TimeSpan.FromSeconds(1.0), new Vector3F(0.0f, 0.0f, 0.0f), new Vector3F(10.0f, 100.0f, 1000.0f))); }
public void ShouldIgnoreByIfToIsSet() { var animation = new Vector3FFromToByAnimation(); animation.From = null; animation.To = new Vector3F(4.0f, 40.0f, 400.0f); animation.By = new Vector3F(10.0f, 100.0f, 1000.0f); Assert.AreEqual(new Vector3F(0.0f, 0.0f, 0.0f), animation.GetValue(TimeSpan.FromSeconds(0.0), new Vector3F(0.0f, 0.0f, 0.0f), new Vector3F(10.0f, 100.0f, 1000.0f))); Assert.AreEqual(new Vector3F(2.0f, 20.0f, 200.0f), animation.GetValue(TimeSpan.FromSeconds(0.5), new Vector3F(0.0f, 0.0f, 0.0f), new Vector3F(10.0f, 100.0f, 1000.0f))); Assert.AreEqual(new Vector3F(4.0f, 40.0f, 400.0f), animation.GetValue(TimeSpan.FromSeconds(1.0), new Vector3F(0.0f, 0.0f, 0.0f), new Vector3F(10.0f, 100.0f, 1000.0f))); }