예제 #1
0
        private TestPath TP(TestRoute route, TestPath source = null)
        {
            var p = new TestPath(route, source, route.Paths.Count());

            route.Add(p);
            if (source != null)
            {
                source.Connect(p);
            }
            return(p);
        }
예제 #2
0
        public TestPath(TestRoute route, TestPath source, int index)
        {
            this.route = route;

            var dir = (route.EndPosition - route.StartPosition).normalized;


            LoftPath        = new LinearPath(route.StartPosition, route.EndPosition);
            SideOffsetStart = source == null ? index * 2 : source.SideOffsetEnd;
            SideOffsetEnd   = index * 2;
            Index           = index;
        }
예제 #3
0
        public RouteData()
        {
            var fl = TestRouteColumn.FarLeft;
            var l  = TestRouteColumn.Left;
            var m  = TestRouteColumn.Middle;
            var r  = TestRouteColumn.Right;
            var fr = TestRouteColumn.FarRight;

            // 0
            mR0 = TR(0, m);

            mR0P0 = TP(mR0);
            mR0P1 = TP(mR0);
            mR0P2 = TP(mR0);

            // 1
            lR1 = TR(1, l, mR0);
            mR1 = TR(1, m, mR0);

            lR1P0 = TP(lR1, mR0P0);
            mR1P0 = TP(mR1, mR0P1);
            mR1P1 = TP(mR1, mR0P2);

            // 2
            lR2 = TR(2, l, lR1);

            lR2P0 = TP(lR2, lR1P0);

            mR2   = TR(2, m, mR1);
            mR2P0 = TP(mR2, mR1P0);


            rR2   = TR(2, r, mR1);
            rR2P0 = TP(rR2, mR1P1);

            // 3
            lR3 = TR(3, l, lR2);

            lR3P0 = TP(lR3, lR2P0);
            lR3P1 = TP(lR3, lR2P0);

            mR3   = TR(3, m, mR2);
            mR3P0 = TP(mR3, mR2P0);
            mR3P1 = TP(mR3, mR2P0);

            rR3   = TR(3, r, rR2);
            rR3P0 = TP(rR3, rR2P0);
            rR3P1 = TP(rR3, rR2P0);

            // 4

            flR4 = TR(4, fl, lR3);

            flR4P0 = TP(flR4, lR3P0);

            lR4 = TR(4, l, lR3);

            lR4P0 = TP(lR4, lR3P1);

            mR4   = TR(4, m, mR3);
            mR4P0 = TP(mR4, mR3P0);
            mR4P1 = TP(mR4, mR3P1);

            frR4 = TR(4, fr, rR3);

            frR4P0 = TP(frR4, rR3P0);
            frR4P1 = TP(frR4, rR3P1);

            // 5

            flR5 = TR(5, fl, flR4);

            flR5P0 = TP(flR5, flR4P0);

            lR5 = TR(5, l, lR4);

            lR5P0 = TP(lR5, lR4P0);
            lR5P1 = TP(lR5, lR4P0);

            mR5 = TR(5, m, mR4);

            mR5P0 = TP(mR5, mR4P0);
            mR5P1 = TP(mR5, mR4P1);

            rR5   = TR(5, r, mR4);
            rR5P0 = TP(rR5, mR4P1);

            frR5   = TR(5, fr, frR4);
            frR5P0 = TP(frR5, frR4P0);
            frR5P1 = TP(frR5, frR4P1);



            inputRoutes = new[] { mR0 };
            inputPaths  = new[] { mR0P0, mR0P1, mR0P2 };

            outputRoutes = new[] { flR5, lR5, mR5, rR5, frR5 };
            outputPaths  = new[] { flR5P0, lR5P0, lR5P1, mR5P0, mR5P1, rR5P0, frR5P0, frR5P1 };

            sequenceRight    = new[] { mR0, mR1, mR2, mR3, mR4, rR5 };
            sequenceMiddle   = new[] { mR0, mR1, mR2, mR3, mR4, mR5 };
            sequenceLeft     = new[] { mR0, lR1, lR2, lR3, lR4, lR5 };
            sequenceFarLeft  = new[] { mR0, lR1, lR2, lR3, flR4, flR5 };
            sequenceFarRight = new[] { mR0, mR1, rR2, rR3, frR4, frR5 };

            spitOutGraph();
        }
예제 #4
0
 internal void Add(TestPath p)
 {
     paths.Add(p);
 }
예제 #5
0
 internal void Connect(TestPath p)
 {
     paths.Add(p);
 }