Package org.mati.geotech.model

Examples of org.mati.geotech.model.GeoObject


 
  public void makeTest() {
    _rects.clear();
    _rtree.clean();
   
    GeoObject rects[] =
    {
      new GeoObject0,   0,100,100),
      new GeoObject(120, 120,100,100),
     
      new GeoObject(700, 700,100,100),
      new GeoObject(900, 900,100,100),
     
      new GeoObject(200, 180,100,100),
//      new Rect(  0, 900,100,100),     
//      new Rect(200, 100,100,100),
//      new Rect(300, 100,100,100),
//      new Rect(400, 100,100,100),
     
//      new Rect(450, 450,100,100),
      new GeoObject(300, 300,100,100),
     
//      new Rect(300, 500,100,100),
//      new Rect(200, 300,100,100),
      new GeoObject(200, 500,100,100)
       
    };
   
    for(GeoObject r:rects) {
      add(r);
View Full Code Here


    double h=100;
    boolean canOverlap=true;
   
    boolean skip = false;
    while(aNOR > 0) {
      GeoObject r = new GeoObject(
          getWorldRect().getX() + Math.random()*(getWidth()-w),
          getWorldRect().getY() + Math.random()*(getHeight()-h),
          Math.random()*(w-10)+10, Math.random()*(h-10)+10);
     
      if(!canOverlap) {
        skip=false;
        for(Rect cur : _rects) {
          if(r.haveCross(cur)) { skip = true; break; }
        }
      }
      if(!skip) {
        _rects.add(r);
        _rtree.addElement(r);
View Full Code Here

TOP

Related Classes of org.mati.geotech.model.GeoObject

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.