Package eas.math.geometry

Examples of eas.math.geometry.Vector2D.mult()


        Vector2D mitte = new Vector2D(
                rob.getEnvironmentEA().getDynWaende()[17].centerPoint());
        Vector2D robPosVer = new Vector2D(rob.getPosition());
        Vector2D robPos = new Vector2D(rob.getPosition());
        Vector2D robBlick = new Vector2D(rob.getBlickrichtung());
        robBlick.mult(30);
        robPosVer.translate(robBlick);

        Vector2D richtPos = new Vector2D(robPos);
        // Richtung von Mitte zu Position des Roboters.
        richtPos.sub(mitte);
View Full Code Here


        if (boundThis != null) {
            middleOfThis = boundThis.middle();
        } else {
            middleOfThis = new Vector2D(0, 0);
        }
        middleOfThis.mult(-1);
        sceneComplete.translateScene(middleOfThis);

        scene = new ObstacleScene(params);
        factor = numberOfGridsPerDir * 1.77
                    + (0.3d - 0.3d / numberOfGridsPerDir);
View Full Code Here

        factor = numberOfGridsPerDir * 1.77
                    + (0.3d - 0.3d / numberOfGridsPerDir);
        scene.scaleScene(factor);
        Vector2D middleOfScene = scene.getBoundingBox().middle();
       
        middleOfScene.mult(-1.0 / factor);
        scene.translateScene(middleOfScene);
        middleOfScene = scene.getBoundingBox().middle();
       
        this.addScene(scene);
        this.addScene(sceneComplete);
View Full Code Here

        if (boundThis != null) {
            middleOfThis = boundThis.middle();
        } else {
            middleOfThis = new Vector2D(0, 0);
        }
        middleOfThis.mult(-1);
        sceneComplete.translateScene(middleOfThis);

        scene = new ObstacleScene(params);
        factor = numberOfGridsPerDir * 1.77
                    + (0.3d - 0.3d / numberOfGridsPerDir);
View Full Code Here

        factor = numberOfGridsPerDir * 1.77
                    + (0.3d - 0.3d / numberOfGridsPerDir);
        scene.scaleScene(factor);
        Vector2D middleOfScene = scene.getBoundingBox().middle();
       
        middleOfScene.mult(-1.0 / factor);
        scene.translateScene(middleOfScene);
        middleOfScene = scene.getBoundingBox().middle();
       
        this.addScene(scene);
        this.addScene(sceneComplete);
View Full Code Here

        Vector2D mitte = new Vector2D(
                rob.getEnvironmentEA().getDynWaende()[17].centerPoint());
        Vector2D robPosVer = new Vector2D(rob.getPosition());
        Vector2D robPos = new Vector2D(rob.getPosition());
        Vector2D robBlick = new Vector2D(rob.getBlickrichtung());
        robBlick.mult(30);
        robPosVer.translate(robBlick);
        int fit = 0;
        int fitKoll = (int) (rob.getAnzUnfaelle()
                * rob.getPars().getParValueDouble(EAPlugin.UNFALL_ABZUG));
        rob.resetAnzUnf();
View Full Code Here

   
    @Override
    public Vector2D getPositionInVisualization(int agentID) {
        try {
            Vector2D pos = new Vector2D(this.getAgentPosition(agentID));
            pos.mult(this.fac);
            pos.translate(new Vector2D(this.fac / 2, this.fac / 2));
            return pos;
        } catch (Exception e) {
            return null;
        }
View Full Code Here

            } else {
                Vector2D v0 = new Vector2D(x2, y2);
                v0.sub(new Vector2D(x1, y1));
                v0.ortho();
                v0.norm();
                v0.mult(12);
               
                x1 += v0.x;
                x2 += v0.x;
                y1 += v0.y;
                y2 += v0.y;
View Full Code Here

            Vector2D v = new Vector2D(x2, y2);
            double dist = new Vector2D(x1, y1).distance(new Vector2D(x2, y2));
           
            v.sub(new Vector2D(x1, y1));
            v.norm();
            v.mult(this.pfeilSpLaenge);
            Vector2D v1 = new Vector2D(x1, y1);
            Vector2D v2 = new Vector2D(x2, y2);
            v2.sub(v);
           
            Vector2D n1 = new Vector2D((x1 + x2) / 2, (y1 + y2) / 2);
View Full Code Here

                            Vector2D verschOrtho = new Vector2D(x1, y1);
                            verschOrtho.sub(new Vector2D(x2, y2));
                            Vector2D verschPar = new Vector2D(verschOrtho);
                            verschPar.norm();
                            verschPar.mult(30);
                            verschOrtho.ortho();
                            verschOrtho.norm();
                            verschOrtho.mult(-10);
                            Vector2D versch = new Vector2D(verschPar);
                            versch.translate(verschOrtho);
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.