Package wolf.util

Examples of wolf.util.Turtle.turn()


            t0 = new Turtle(is.pos, Math.toDegrees(Angle.angle(is.pos, r.a.pos)));
          }
          Turtle t1 = new Turtle(t0.pos, t0.angle);
          //move out to sides of roads
          t0.turn(90);
          t1.turn(-90);
          t0.move(radius);
          t1.move(radius);
          Coordinate t0Start = new Coordinate(t0.pos);
          Coordinate t1Start = new Coordinate(t1.pos);
          //return to first orientation
View Full Code Here


          t1.move(radius);
          Coordinate t0Start = new Coordinate(t0.pos);
          Coordinate t1Start = new Coordinate(t1.pos);
          //return to first orientation
          t0.turn(-90);
          t1.turn(90);
          t0.move(r.width*6);
          t1.move(r.width*6);
         
          LineSegment ls0 = new LineSegment(t0Start, t0.pos);
          LineSegment ls1 = new LineSegment(t1Start, t1.pos);
View Full Code Here

            t0 = new Turtle(is.pos, Math.toDegrees(Angle.angle(is.pos, r.a.pos)));
          }
         
          //move out from intersection and split into road width
          t0.move(extrusion[j]);
          t0.turn(90);
          Turtle t1 = new Turtle(t0.pos, t0.angle-180);
          t0.move(radius);
          t1.move(radius);
         
          segments[j] = new LineSegment(t0.pos, t1.pos);
View Full Code Here

   
    Turtle ta = new Turtle(a.pos, ang);
    ta.move(minimumRoadLength*.9);
    coords[0] = new Coordinate(ta.pos); //start point
    coords[6] = coords[0]; //first element is also last
    ta.turn(collisionGeometryAngle);
    ta.move(length);
    coords[1] = new Coordinate(ta.pos);
    ta.angle = ang - 90;
    ta.move(collisionGeometryWidth);
    coords[5] = new Coordinate(ta.pos);
View Full Code Here

    coords[5] = new Coordinate(ta.pos);
   
    Turtle tb = new Turtle(b.pos, ang+180);
    tb.move(minimumRoadLength*.9);
    coords[3] = new Coordinate(tb.pos); //end point
    tb.turn(collisionGeometryAngle);
    tb.move(length);
    coords[4] = new Coordinate(tb.pos);
    tb.angle = ang - 90;
    tb.move(collisionGeometryWidth);
    coords[2] = new Coordinate(tb.pos);
View Full Code Here

      t.move(-roadLength(t.angle));
      r.b.pos = t.pos;
      return r;
    }
    case LEFT:{
      t.turn(90);
      t.move(-roadLength(t.angle));
      r.b.pos = t.pos;
      return r;
    }
    case RIGHT:{
View Full Code Here

      t.move(-roadLength(t.angle));
      r.b.pos = t.pos;
      return r;
    }
    case RIGHT:{
      t.turn(90);
      t.move(roadLength(t.angle));
      r.b.pos = t.pos;
      return r;
    }
    default:{
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.