コード例 #1
0
ファイル: World.cs プロジェクト: RicardoBakker/StellageSim
        private Vrachtwagen CreateVrachtwagen(double x, double y, double z)
        {
            Vrachtwagen v = new Vrachtwagen(x, y, z, 0, 0, 0);

            worldObjects.Add(v);
            return(v);
        }
コード例 #2
0
ファイル: World.cs プロジェクト: RicardoBakker/StellageSim
        public World()
        {
            Robot       r  = CreateRobot(1, 0.5, 10);
            Robot       r2 = CreateRobot(1, 0.5, 1);
            Vrachtwagen v  = CreateVrachtwagen(30, 10, -3.5);

            //Dock d = CreateDock(0, 0, 0);
            v.Rotate(0, -90 * (Math.PI / 180), 0);
            //r2.Move(10, 0, 13);
            GraphNode <String> NodeA = new GraphNode <String>("A", 0, 0.5, 5);
            GraphNode <String> NodeB = new GraphNode <String>("B", 5, 0.5, 5);
            GraphNode <String> NodeC = new GraphNode <String>("C", 5, 0.5, 10);
            GraphNode <String> NodeD = new GraphNode <String>("D", 10, 0.5, 10);
            GraphNode <String> NodeE = new GraphNode <String>("E", 10, 0.5, 5);
            GraphNode <String> NodeF = new GraphNode <String>("F", 15, 0.5, 5);
            GraphNode <String> NodeG = new GraphNode <String>("G", 15, 0.5, 15);

            List <GraphNode <String> > nodelist = new List <GraphNode <String> > {
                NodeC, NodeD, NodeE, NodeF, NodeG
            };
            List <GraphNode <String> > nodelist2 = new List <GraphNode <String> > {
                NodeA, NodeB, NodeC, NodeD, NodeE
            };

            v.Rotate(0, -90 * (Math.PI / 180), 0);
            r2.Rotate(0, -90 * (Math.PI / 180), 0);
            r.GiveDestination(nodelist);
            r2.GiveDestination(nodelist2);

            v.GiveDestination(5, 0, 0);
        }