Exemplo n.º 1
0
        public void Axis_GetSet_ReturnsCorrectValue()
        {
            var sqrt2over2 = (dReal)(Math.Sqrt(2) / 2);
            var targetAxis = new Vector3(0, 1, 0);
            var quaternion = new Quaternion(sqrt2over2, 0, sqrt2over2, 0);

            using (var body1 = new Body(world))
            {
                body1.Quaternion = quaternion;
                motor.Attach(body1, null);
                motor.NumAxes = 1;
                motor.Axis1   = targetAxis;
                Assert.AreEqual(targetAxis, motor.Axis1);

                motor.SetAxis(0, RelativeOrientation.FirstBody, targetAxis);
                Assert.AreEqual(targetAxis, motor.Axis1);
            }
        }