Exemplo n.º 1
0
        /// <summary>
        /// Creates a new road
        /// </summary>
        /// <param name="x">x-position</param>
        /// <param name="z">z-position</param>
        /// <param name="width"></param>
        /// <param name="height"></param>
        private void drawRoad(double x, double z, double width, double height)
        {
            Model3D road = new Model3D(this, "road", x, 0, z, 0, 0, 0);

            road.Transform(width, height, 0);
            worldObjects.Add(road);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Draw nodes and synapses on screen
        /// </summary>
        private void drawNodes()
        {
            foreach (Node node in grid.GetNodes)
            {
                Model3D model = CreateModel3D("node", node.x, 0, node.z);
                model.attr = node.type;
            }

            foreach (ConnectedNodes connectedNodes in grid.GetConnectedNodes)
            {
                Model3D synapse = CreateModel3D("synapse", connectedNodes.Source.x, 0, connectedNodes.Source.z);
                synapse.Transform(connectedNodes.Destination.x, 0, connectedNodes.Destination.z);
                worldObjects.Add(synapse);
            }
        }