Package eas.math.geometry

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


            boolean color) {
        Polygon2D tileTurned = new Polygon2D();
        for (Vector2D v : tile) {
            tileTurned.add(new Vector2D(v));
        }
        tileTurned.rotate(Vector2D.NULL_VECTOR, angle);
       
        for (Vector2D p : tileTurned) {
            Vector2D gesPos = new Vector2D(pos);
            gesPos.translate(p);
            this.setPix((int) Math.round(gesPos.x), (int) Math.round(gesPos.y), color);
View Full Code Here


        // Try new position.
        Polygon2D newShape = new Polygon2D();
        for (Vector2D v : tile) {
            newShape.add(new Vector2D(v));
        }
        newShape.rotate(Vector2D.NULL_VECTOR, this.getAgentAngle(agentID));
        for (Vector2D p : newShape) {
            Vector2D reqPos = new Vector2D(newPosition);
            reqPos.translate(p);
            if (this.getPix((int) Math.round(reqPos.x), (int) Math.round(reqPos.y))) {
                // Redraw old position.
View Full Code Here

        // Try new position.
        Polygon2D shapeNew = new Polygon2D();
        for (Vector2D v : shapeOld) {
            shapeNew.add(new Vector2D(v));
        }
        shapeNew.rotate(Vector2D.NULL_VECTOR, angleNew);
        for (Vector2D p : shapeNew) {
            if (this.getPix((int) Math.round(p.x + posOld.x), (int) Math.round(p.y + posOld.y))) {
                // Redraw old position.
                this.drawTile(
                        shapeOld,
View Full Code Here

       
        p.scale(
                Vector2D.NULL_VECTOR,
                new Vector2D(1 / this.dicken.get(0), 1 / this.dicken.get(0)));
       
        p.rotate(Vector2D.NULL_VECTOR, winkel);
       
        return p;
    }
   
    /**
 
View Full Code Here

                        ArrowMaster.EINFACHER_ABSCHLUSS,
                        ArrowMaster.KUGEL_ENDE,
                        new Vector2D(1, 1),
                        new Vector2D(0.45, 0.45));
       
        pol.rotate(pol.centerPoint(), Math.PI);
        pol = pol.normalize(GlobalVariables.getPrematureParameters());
       
        Polygon2D pol2 =
                new ArrowMaster(GlobalVariables.getPrematureParameters()).segmentPfeilPol2D(
                        pol,
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.