Package eas.math.geometry

Examples of eas.math.geometry.Polygon2D.toPol()


                for (int j = 0; j < this.tileNumVertically; j++) {
                    Rectangle2D r = this.getTileRectangle(new Vector2D(i, j));
                    Polygon2D polInVis = super.getPolygonInVisualization(r.toPol2D());
                    Vector2D pos = polInVis.centerPoint();
                    g.setColor(Color.orange);
                    g.drawPolygon(polInVis.toPol());
//                    g.drawString(i + " / " + j, (float) pos.x, (float) pos.y);
                    g.drawString("" + this.getAgentsTouchingTile(new Vector2D(i, j)).size(), (float) pos.x, (float) pos.y);
                }
            }
        }
View Full Code Here


                Vector2D agPos = ((AbstractEnvironment2D) this.currentEnv).getPointInVisualization(((AbstractEnvironment2D) this.currentEnv).getAgentPosition(this.markedAgentId));
                agPos.sub(new Vector2D(width / 2, height / 2));
                g.drawOval((int) agPos.x, (int) agPos.y, (int) (width), (int) (height));
               
                Polygon2D pol2D = ((AbstractEnvironment2D) this.currentEnv).getAgentShapeInVisualization(this.markedAgentId);
                Polygon pol = pol2D.toPol();
                g.setColor(Color.red);
                g.drawPolygon(pol);
            } catch (Exception e) {
                try {
                    g.drawOval(
View Full Code Here

                    dicken,
                    ArrowMaster.EINFACHER_ABSCHLUSS,
                    ArrowMaster.EINFACHER_ABSCHLUSS,
                    new Vector2D(1, 1),
                    new Vector2D(1, 1));
            zeichenObjekte.add(pol.toPol());
           
//            for (Pol2DMitAusgMerkm pa : gestrichelt) {
//                if (pa != null) {
//                    zeichenObjekte.add(pa.getAusg());
//                    zeichenObjekte.add(pa.getPol().toPol());
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.