Package eas.math.geometry

Examples of eas.math.geometry.Vector2D


     */
    @Override
    public List<SingleParameter> getParameters() {
        ArrayList<SingleParameter> arr = new ArrayList<SingleParameter>(7);
        ArrayListVec2D av = new ArrayListVec2D();
        av.add(new Vector2D(29.12, 212.2));
        av.add(new Vector2D(1.12, 12.2));
        av.add(new Vector2D(9.12, .2));

        ArrayListDouble av2 = new ArrayListDouble();
        av2.add(1.1);
        av2.add(2.2);
        av2.add(3.3);
View Full Code Here


    @Override
    public Vector2D getPointInVisualization(Vector3D fieldPos) {
        double scale = env.globalScale();
        Polygon2D b = env.getCurrentViewBox().toPol2D();

        b.scale(Vector2D.NULL_VECTOR, new Vector2D(scale, scale));
        Vector2D pos = new Vector2D(fieldPos.x, fieldPos.y);

        if (env.getVisualizationAngleCenterPoint() != null) {
            pos.rotate(env.getVisualizationAngleCenterPoint(), env.getVisualizationAngleRAD());
        }

        pos.scale(Vector2D.NULL_VECTOR, new Vector2D(scale, scale));
        Vector2D midTranslation = new Vector2D(
                env.getScreenWidth() / 2,
                env.getScreenHeight() / 2);
        midTranslation.sub(b.centerPoint());
        pos.translate(midTranslation);

        return pos;
    }
View Full Code Here

        return pos;
    }

    @Override
    public Vector2D getRealPosFromScreenPos(Vector2D screenPos) {
        Vector2D pos = new Vector2D(screenPos.x, screenPos.y);
        Rectangle2D box = env.getCurrentViewBox();
       
        Polygon2D pinkBorder = env.getPinkBorder();
       
        pos.sub(new Vector2D(
                pinkBorder.getBoundingBox().upperLeftCorner().x,
                pinkBorder.getBoundingBox().upperLeftCorner().y));
       
        pos.x = pos.x / env.globalScale();
        pos.y = pos.y / env.globalScale();
       
        pos.translate(box.upperLeftCorner());
       
        if (env.getVisualizationAngleCenterPoint() != null) {
            pos.rotate(env.getVisualizationAngleCenterPoint(), -env.getVisualizationAngleRAD());
        }
       
        return pos;
    }
View Full Code Here

     */
    public PanicSceneWithColumn(String ident, ParCollection params) {
        super(ident, params);
        this.addAgent(
                new StaticPanicObstacle(110, null, params),
                new Vector2D(0, 0),
                0,
                new Vector2D(1, 1));

        this.addAgent(
                new StaticPanicObstacle(111, null, params),
                new Vector2D(0, 98),
                0,
                new Vector2D(1, 1));

        this.addAgent(
                new StaticPanicObstacle(112, null, params),
                new Vector2D(0, 0),
                90,
                new Vector2D(1, 1));

        this.addAgent(
                new StaticPanicObstacleShort(113, null, params),
                new Vector2D(100, 0),
                75,
                new Vector2D(1, 1));

        this.addAgent(
                new StaticPanicObstacleShort(114, null, params),
                new Vector2D(110, 37),
                25,
                new Vector2D(1, 1));

        this.addAgent(
                new StaticPanicObstacleShort(115, null, params),
                new Vector2D(100, 98),
                -25,
                new Vector2D(1, 1));

        this.addAgent(
                new StaticPanicObstacleVeryShort(116, null, params),
                new Vector2D(151.5, 65),
                130,
                new Vector2D(1, 1));

        this.addAgent(
                new PanicCircle(0, null, params),
                new Vector2D(128, 64),
                0,
                new Vector2D(1, 1));
    }
View Full Code Here

     */
    public PanicScene(String ident, ParCollection params) {
        super(ident, params);
        this.addAgent(
                new StaticPanicObstacle(110, null, params),
                new Vector2D(0, 0),
                0,
                new Vector2D(1, 1));

        this.addAgent(
                new StaticPanicObstacle(111, null, params),
                new Vector2D(0, 98),
                0,
                new Vector2D(1, 1));

        this.addAgent(
                new StaticPanicObstacle(112, null, params),
                new Vector2D(0, 0),
                90,
                new Vector2D(1, 1));

        this.addAgent(
                new StaticPanicObstacleShort(113, null, params),
                new Vector2D(100, 0),
                75,
                new Vector2D(1, 1));

        this.addAgent(
                new StaticPanicObstacleShort(114, null, params),
                new Vector2D(110, 37),
                25,
                new Vector2D(1, 1));

        this.addAgent(
                new StaticPanicObstacleShort(115, null, params),
                new Vector2D(100, 98),
                -25,
                new Vector2D(1, 1));

        this.addAgent(
                new StaticPanicObstacleVeryShort(116, null, params),
                new Vector2D(151.5, 65),
                130,
                new Vector2D(1, 1));

//        this.addAgent(
//                new StaticPanicObstacleVeryShort(117, null),
//                new Vector2D(150, 50),
//                90,
View Full Code Here

    }
    if (forceGetTowardsExit == null) {
      forceGetTowardsExit = new Vector2f();
    }

    final double distanceFire = ((AbstractEnvironment2D) getEnvironment()).getAgentPosition(id()).distance(new Vector2D(fireLocation.x, fireLocation.y));
    final double distanceExit = ((AbstractEnvironment2D) getEnvironment()).getAgentPosition(id()).distance(new Vector2D(exitLocation.x, exitLocation.y));

    if ((Boolean) this.sense("IsInPanic?")) {
      forceNormal.x = 0;
      forceNormal.y = 0;
View Full Code Here

  public synchronized Polygon2D getAgentShape() {
    if (pacman == null) {
      pacman = new Polygon2D();

      for (double d = 0; d < Math.PI * 1.75; d += Math.PI * 2 / precision) {
        pacman.add(new Vector2D(Math.sin(d) * radius, Math.cos(d) * radius));
      }
      pacman.add(new Vector2D(0, 0));
      pacman.rotate(Vector2D.NULL_VECTOR, -Math.PI * 0.125);
    }

    return pacman;
  }
View Full Code Here

        this.aktBewegung = 0;
        this.aktBewegungPar = 0;

        this.sensoren = new int[256];
       
        this.position = new Vector2D(x, y);
        this.ausd = new Vector2D(xAusd, yAusd);
        this.blickrichtung = new Vector2D(
                Math.cos(alpha) * this.pars.getParValueDouble(eas.statistics.ConstantsStatistics.VERZERR_ATTR),
                Math.sin(alpha) * this.pars.getParValueDouble(eas.statistics.ConstantsStatistics.VERZERR_ATTR));
        this.winkel = this.gultWinkel(wink);
        this.umg = umgebung;
        this.eckPunkte = new Vector2D[4];
View Full Code Here

            teilWinkel = this.sensOeffn[i]
                             / ((double) ConstantsSimulation.ABSTUFUNGEN - 1);

            for (int j = 0; j < ConstantsSimulation.ABSTUFUNGEN; j++) {
                betaRAD = Math.PI * beta / 180;
                this.alleAbsSensRicht[j][i] = new Vector2D(
                        Math.cos(betaRAD),
                        Math.sin(betaRAD));
                beta = beta + teilWinkel;
            }
        }
View Full Code Here

                ConstantsSimulation.FARBE_HGND,
                true,
                false,
                true);
       
        this.setPosition(new Vector2D(x, y));
        this.setBlickRicht(alpha);
       
        this.umg.setzeRob(
                eckpunkte,
                farbeRob,
View Full Code Here

TOP

Related Classes of eas.math.geometry.Vector2D

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.