Package ds.moteur.route

Examples of ds.moteur.route.Route


    super("Defaut 2");
   
    Carrefour carrefour1 = new Carrefour3Branches(new Point(-61, 0), new Angle3D(Math.PI/2, 0), 3);
    Carrefour carrefour2 = new Carrefour3Branches(new Point(51, 40*(2-Math.sqrt(3))), new Angle3D(-Math.PI/2, 0), 3);
   
    Route route1 = RouteDroite.createRoute(new Point(-40, 0), new Angle3D(0, 0), "Route 1", 30, 3, 1, false);
    Route route2 = new RouteCourbe(new Point(-25, 40), new Angle3D(7*Math.PI/6, 0), "Toto", 40, 3, Math.PI/6);
    Route route3 = new RouteCourbe(new Point(15, -40 + 40*(2-Math.sqrt(3))), new Angle3D(Math.PI/6, 0), "Toto", 40, 3, Math.PI/6);
    Route route4 = RouteDroite.createRoute(new Point(30, 40*(2-Math.sqrt(3))), new Angle3D(0, 0), "Route 4", 30, 3, 1, false);
   
    Route route5 = new RouteCourbe(new Point(-71, 6), new Angle3D(Math.PI/2, 0), "Toto", 10, 3, Math.PI);
    Route route6 = new RouteCourbe(new Point(-71, -6), new Angle3D(-Math.PI/2, 0), "Toto", 10, 3, Math.PI);
    Route route7 = RouteDroite.createRoute(new Point(-81, 0), new Angle3D(Math.PI/2, 0), "Toto", 12, 3, 1, false);
   
    Route route8 = new RouteCourbe(new Point(59, 40*(2-Math.sqrt(3)) + 6), new Angle3D(Math.PI/2, 0), "Toto", 8, 3, Math.PI/2);
    Route route9 = new RouteCourbe(new Point(59, 40*(2-Math.sqrt(3)) - 6), new Angle3D(Math.PI, 0), "Toto", 8, 3, Math.PI/2);
    Route route10 = new RouteCourbe(new Point(59, 40*(2-Math.sqrt(3))), new Angle3D(0, 0), "Toto", 14, 3, Math.PI);
    /*Route route8 = new RouteDroite(new Point(0, -7.5), new Angle3D(Math.PI/2, 0), "Toto", 5, 2.5);
    Route route9 = new RouteDroite(new Point(7.5, 0), new Angle3D(0, 0), "Toto", 5, 2.5);
    Route route10 = new RouteDroite(new Point(7.5, -15), new Angle3D(0, 0), "Toto", 5, 2.5);
    Route route11 = new RouteDroite(new Point(15, -7.5), new Angle3D(Math.PI/2, 0), "Toto", 5, 2.5);
    Route route12 = new RouteCourbe(new Point(20, -7.5), new Angle3D(0, 0), "Toto", 7.5, 2.5, Math.PI);*/
   
    this.addSection(carrefour1);
    this.addSection(carrefour2);
   
    this.addSection(route1);
    this.addSection(route2);
    this.addSection(route3);
    this.addSection(route4);
    this.addSection(route5);
    this.addSection(route6);
    this.addSection(route7);
    this.addSection(route8);
    this.addSection(route9);
    this.addSection(route10);
    /*this.addSection(route11);
    this.addSection(route12);*/
   
    this.calculerTerrainAbsolu();
   
    carrefour1.addConnexion(route1);
    carrefour1.addConnexion(route5);
    carrefour1.addConnexion(route6);
   
    carrefour2.addConnexion(route4);
    carrefour2.addConnexion(route8);
    carrefour2.addConnexion(route9);
   
    route1.addConnexion(carrefour1);
    route1.addConnexion(route2);
   
    route2.addConnexion(route1);
    route2.addConnexion(route3);
   
    route3.addConnexion(route2);
    route3.addConnexion(route4);
   
    route4.addConnexion(route3);
    route4.addConnexion(carrefour2);
   
    route5.addConnexion(carrefour1);
    route5.addConnexion(route7);
   
    route6.addConnexion(carrefour1);
    route6.addConnexion(route7);
   
    route7.addConnexion(route5);
    route7.addConnexion(route6);
   
    route8.addConnexion(carrefour2);
    route8.addConnexion(route10);
   
    route9.addConnexion(carrefour2);
    route9.addConnexion(route10);
   
    route10.addConnexion(route8);
    route10.addConnexion(route9);
   
    this.etablirConnexion();
   
    //System.out.println(this.essayerLienBidirectionnel(carrefour1, carrefour2));
   
View Full Code Here


public class TerrainDefaut extends Terrain {

  public TerrainDefaut() {
    super("Defaut");
    Route route1 = RouteDroite.createRoute(new Point(-5, 5), new Angle3D(0, 0), "Route 1", 10, 2.5, 1, false);
    Route route2 = new RouteCourbe(new Point(-10, 0), new Angle3D(Math.PI/2, 0), "Route 2", 5, 2.5, Math.PI/2);
    Route route3 = new RouteCourbe(new Point(-10, 0), new Angle3D(Math.PI, 0), "Route 3", 5, 2.5, Math.PI/2);
    Route route4 = RouteDroite.createRoute(new Point(-5, -5), new Angle3D(0, 0), "Route 4", 10, 2.5, 1, false);
    Route route5 = new RouteCourbe(new Point(10, 10), new Angle3D(-3*Math.PI/4, 0), "Route 5", 5, 2.5, Math.PI/4);
    Route route6 = new RouteCourbe(new Point(10, -10), new Angle3D(0, 0), "Route 6", 5, 2.5, Math.PI/4);
    Route route7 = new RouteCourbe(new Point(20, 0), new Angle3D(Math.PI/4, 0), "Route 7", 10*Math.sqrt(2)-5, 2.5, 3*Math.PI/2);
    Carrefour carrefour1 = new Carrefour3Branches(new Point(5, 5), new Angle3D(0, 0), 2.5);
    Carrefour carrefour2 = new Carrefour3Branches(new Point(5, -5), new Angle3D(Math.PI, 0), 2.5);
   
    this.addSection(route1);
    this.addSection(route2);
    this.addSection(route3);
    this.addSection(route4);
    this.addSection(route5);
    this.addSection(route6);
    this.addSection(route7);
    this.addSection(carrefour1);
    this.addSection(carrefour2);
   
    this.calculerTerrainAbsolu();
   
    route1.addConnexion(carrefour1);
    route1.addConnexion(route2);
   
    route2.addConnexion(route3);
    route2.addConnexion(route1);
   
    route3.addConnexion(route4);
    route3.addConnexion(route2);
   
    route4.addConnexion(route3);
    route4.addConnexion(carrefour2);
   
    route5.addConnexion(carrefour1);
    route5.addConnexion(route7);
   
    route6.addConnexion(carrefour2);
    route6.addConnexion(route7);
   
    route7.addConnexion(route5);
    route7.addConnexion(route6);
   
    carrefour1.addConnexion(route1);
    carrefour1.addConnexion(carrefour2);
    carrefour1.addConnexion(route5);
   
View Full Code Here

public class TerrainDefaut3 extends Terrain {

  public TerrainDefaut3() {
    super("Defaut3");
   
    Route route1 = RouteDroite.createRoute(new Point(-5, 6), new Angle3D(0, 0), "Route 1", 10, 3, 1, false);
    Route route2 = new RouteCourbe(new Point(-10, 0), new Angle3D(Math.PI/2, 0), "Route 2", 6, 3, Math.PI/2);
    Route route3 = new RouteCourbe(new Point(-10, 0), new Angle3D(Math.PI, 0), "Route 3", 6, 3, Math.PI/2);
    Route route4 = RouteDroite.createRoute(new Point(-5, -6), new Angle3D(0, 0), "Route 4", 10, 3, 1, false);
    Route route5 = new RouteCourbe(new Point(12, 12), new Angle3D(-3*Math.PI/4, 0), "Route 5", 6, 3, Math.PI/4);
    Route route6 = new RouteCourbe(new Point(12, -12), new Angle3D(0, 0), "Route 6", 6, 3, Math.PI/4);
    Route route7 = new RouteCourbe(new Point(24, 0), new Angle3D(Math.PI/4, 0), "Route 7", 12*Math.sqrt(2)-6, 3, 3*Math.PI/2);
    Carrefour carrefour1 = new Carrefour3Branches(new Point(6, 6), new Angle3D(0, 0), 3);
    Carrefour carrefour2 = new Carrefour3Branches(new Point(6, -6), new Angle3D(Math.PI, 0), 3);
   
    this.addSection(route1);
    this.addSection(route2);
    this.addSection(route3);
    this.addSection(route4);
    this.addSection(route5);
    this.addSection(route6);
    this.addSection(route7);
    this.addSection(carrefour1);
    this.addSection(carrefour2);
   
    this.calculerTerrainAbsolu();
   
    route1.addConnexion(carrefour1);
    route1.addConnexion(route2);
   
    route2.addConnexion(route3);
    route2.addConnexion(route1);
   
    route3.addConnexion(route4);
    route3.addConnexion(route2);
   
    route4.addConnexion(route3);
    route4.addConnexion(carrefour2);
   
    route5.addConnexion(carrefour1);
    route5.addConnexion(route7);
   
    route6.addConnexion(carrefour2);
    route6.addConnexion(route7);
   
    route7.addConnexion(route5);
    route7.addConnexion(route6);
   
    carrefour1.addConnexion(route1);
    carrefour1.addConnexion(carrefour2);
    carrefour1.addConnexion(route5);
   
View Full Code Here

TOP

Related Classes of ds.moteur.route.Route

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.