Package net.sf.fysix.leveleditor.tool.position

Examples of net.sf.fysix.leveleditor.tool.position.WorldPos


        }
    }
   
    public void moveCoverage(WorldPos diff) {
        for (int i = 0; i < vertices.size(); i++) {
          WorldPos vertex = (WorldPos)vertices.get(i);
            vertex.add(diff);
        }
        recalcBoundingBox();
    }
View Full Code Here


        int maxX = -999;
        int minY = 999;
        int maxY = -999;
       
        for (int i = 0; i < vertices.size(); i++) {
          WorldPos vertex = (WorldPos)vertices.get(i);
          minX = Math.min(vertex.getX(), minX);
          minY = Math.min(vertex.getY(), minY);
          maxX = Math.max(vertex.getX(), maxX);
          maxY = Math.max(vertex.getY(), maxY);
        }

        if (minX != 999 && maxX != -999 && minY != 999 && maxY != -999) {
            NW = new WorldPos(minX, minY);
            SE = new WorldPos(maxX, maxY);

            setPosition(NW);
        }
    }
View Full Code Here

//      dim = new Dimension(pSE.x - pNW.x + dotSize, pSE.y - pNW.y + dotSize);
             
        /* Build 2D polygon */
        polygon = new Polygon();
        for (int i = 0; i < vertices.size(); i++) {
          WorldPos vertex = (WorldPos)vertices.get(i);
//            System.out.println("CoverageMapObject: recalcDim: " + vertex);
            //Point screen = vs.translatePosToScreen(vertex);
            //polygon.addPoint(screen.x - pNW.x, screen.y - pNW.y);
          polygon.addPoint(vertex.getX(), vertex.getY());
        }
    }
View Full Code Here

TOP

Related Classes of net.sf.fysix.leveleditor.tool.position.WorldPos

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.