Package ds.moteur.route.cc.elements

Examples of ds.moteur.route.cc.elements.Arc


   */
  public boolean addArc(Point centre, double rayon, double angleOrigine, double ouverture, int skip){
    boolean ok = false;
   
    if (elements.size() < positions.size() - 1){
      Arc arc = new Arc(positions.get(indexElement), positions.get(indexElement+1+skip), centre, rayon, angleOrigine, ouverture);
      arc.calculerLongueur();
      this.elements.add(arc);
      ok = true;
      indexElement += (skip+1);
    }
   
View Full Code Here


      for (int i = 1; i<positions.size() - 1; i++){
        positions.get(i).transformer(origine.getPositionAbsolue(), origine.getAngle().theta);
      }
      for (LigneElementaire element : elements){
        if (element instanceof Arc){
          Arc arc = (Arc)element;
          arc.transformer(origine.getPositionAbsolue(), origine.getAngle().theta);
        }
      }
    }
  }
View Full Code Here

    for(int i=0; i<n2; i++){
      int type = dis.readShort();
      if(type == TypeElement.SEGMENT.ordinal()){
        this.addSegment();
      } else {
        Arc arc = new Arc();
        arc.load(dis);
        int skip = dis.readShort();
        this.addArc(arc.getCentre(), arc.getRayon(), arc.getAngleOrigine(), arc.getOuverture(), skip);
      }
    }
  }
View Full Code Here

    //Sauvegarde des lignes �l�mentaires
    dos.writeShort(elements.size());
    for (LigneElementaire element : elements){
      element.save(dos);
      if(element instanceof Arc){
        Arc arc = (Arc)element;
        int skip = positions.indexOf(arc.getP2()) - positions.indexOf(arc.getP1()) - 1;
        dos.writeShort(skip);
      }
    }
  }
View Full Code Here

TOP

Related Classes of ds.moteur.route.cc.elements.Arc

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.