Пример #1
0
        public void RotationRingCalculationTest5()
        {
            var axis = new AvidWindow(AvidDirection.CD, AvidRing.Blue, false);

            var result = ServiceFactory.Library.AvidCalculator.GetRotationCircleFromNormal(axis);

            TestChecksUtility.CheckAvidWindow(result[0], AvidDirection.CD, AvidRing.Green, true);
            TestChecksUtility.CheckAvidWindow(result[1], AvidDirection.DE, AvidRing.Green, true);
            TestChecksUtility.CheckAvidWindow(result[2], AvidDirection.E, AvidRing.Blue, true);
            TestChecksUtility.CheckAvidWindow(result[3], AvidDirection.E, AvidRing.Ember, true);
            TestChecksUtility.CheckAvidWindow(result[4], AvidDirection.E, AvidRing.Blue, false);
            TestChecksUtility.CheckAvidWindow(result[5], AvidDirection.EF, AvidRing.Green, false);
            TestChecksUtility.CheckAvidWindow(result[6], AvidDirection.FA, AvidRing.Green, false);
            TestChecksUtility.CheckAvidWindow(result[7], AvidDirection.AB, AvidRing.Green, false);
            TestChecksUtility.CheckAvidWindow(result[8], AvidDirection.B, AvidRing.Blue, false);
            TestChecksUtility.CheckAvidWindow(result[9], AvidDirection.B, AvidRing.Ember, true);
            TestChecksUtility.CheckAvidWindow(result[10], AvidDirection.B, AvidRing.Blue, true);
            TestChecksUtility.CheckAvidWindow(result[11], AvidDirection.BC, AvidRing.Green, true);
        }
Пример #2
0
        public void CheckBacktracking4()
        {
            var observerVelocity = new HexVector
            {
                PrimaryComponent   = new HexVectorComponent(HexAxis.A, 1),
                SecondaryComponent = HexVectorComponent.Zero,
                VerticalComponent  = new HexVectorComponent(HexAxis.Up, 3)
            };

            var observedVelocity = new HexVector
            {
                PrimaryComponent   = new HexVectorComponent(HexAxis.B, 1),
                SecondaryComponent = HexVectorComponent.Zero,
                VerticalComponent  = new HexVectorComponent(HexAxis.Up, 14)
            };
            var window = _calculator.GetVectorFromBacktracking(observerVelocity, observedVelocity);

            TestChecksUtility.CheckAvidWindow(window, AvidDirection.Undefined, AvidRing.Magenta, false);
        }
Пример #3
0
        public void CheckBacktracking3()
        {
            var observerVelocity = new HexVector
            {
                PrimaryComponent   = new HexVectorComponent(HexAxis.A, 5),
                SecondaryComponent = new HexVectorComponent(HexAxis.B, 2),
                VerticalComponent  = new HexVectorComponent(HexAxis.Down, 1)
            };

            var observedVelocity = new HexVector
            {
                PrimaryComponent   = new HexVectorComponent(HexAxis.A, 4),
                SecondaryComponent = new HexVectorComponent(HexAxis.C, 2),
                VerticalComponent  = new HexVectorComponent(HexAxis.Up, 5)
            };
            var window = _calculator.GetVectorFromBacktracking(observerVelocity, observedVelocity);

            TestChecksUtility.CheckAvidWindow(window, AvidDirection.A, AvidRing.Green, false);
        }
Пример #4
0
        public void CheckBacktracking2()
        {
            var observerVelocity = new HexVector
            {
                PrimaryComponent   = new HexVectorComponent(HexAxis.A, 6),
                SecondaryComponent = new HexVectorComponent(HexAxis.B, 5),
                VerticalComponent  = new HexVectorComponent(HexAxis.Up, 7)
            };

            var observedVelocity = new HexVector
            {
                PrimaryComponent   = new HexVectorComponent(HexAxis.C, 6),
                SecondaryComponent = new HexVectorComponent(HexAxis.B, 4),
                VerticalComponent  = new HexVectorComponent(HexAxis.Up, 1)
            };
            var window = _calculator.GetVectorFromBacktracking(observerVelocity, observedVelocity);

            TestChecksUtility.CheckAvidWindow(window, AvidDirection.FA, AvidRing.Blue, true);
        }
Пример #5
0
        public void CheckBacktracking1()
        {
            var observerVelocity = new HexVector
            {
                PrimaryComponent   = new HexVectorComponent(HexAxis.A, 6),
                SecondaryComponent = HexVectorComponent.Zero,
                VerticalComponent  = HexVectorComponent.Zero
            };

            var observedVelocity = new HexVector
            {
                PrimaryComponent   = new HexVectorComponent(HexAxis.B, 5),
                SecondaryComponent = HexVectorComponent.Zero,
                VerticalComponent  = HexVectorComponent.Zero
            };
            var window = _calculator.GetVectorFromBacktracking(observerVelocity, observedVelocity);

            TestChecksUtility.CheckAvidWindow(window, AvidDirection.F, AvidRing.Ember, true);
        }
Пример #6
0
        public void OppositeWindowTest()
        {
            var window = new AvidWindow(AvidDirection.A, AvidRing.Ember, true);

            var result = ServiceFactory.Library.AvidCalculator.GetOppositeWindow(window);

            TestChecksUtility.CheckAvidWindow(result, AvidDirection.D, AvidRing.Ember, true);

            window.Direction = AvidDirection.Undefined;
            window.Ring      = AvidRing.Magenta;
            result           = ServiceFactory.Library.AvidCalculator.GetOppositeWindow(window);
            TestChecksUtility.CheckAvidWindow(result, AvidDirection.Undefined, AvidRing.Magenta, false);

            window.Direction  = AvidDirection.BC;
            window.Ring       = AvidRing.Blue;
            window.AbovePlane = false;
            result            = ServiceFactory.Library.AvidCalculator.GetOppositeWindow(window);
            TestChecksUtility.CheckAvidWindow(result, AvidDirection.EF, AvidRing.Blue, true);
        }