Package eas.math.geometry

Examples of eas.math.geometry.Rectangle2D


        AbstractEnvironment2D<AbstractAgent2D> env2D = null;

        try {
            env2D = (AbstractEnvironment2D) this.environment;
            if (env2D.getZoomBox() == null) {
                Rectangle2D boundingBox = env2D.getBoundingBox(false);
                env2D.setZoomBox(new Rectangle2D(boundingBox.upperLeftCorner(), boundingBox.lowerRightCorner()));
            }
            Vector2D delta = new Vector2D(deltaVector);
            double globalScale = env2D.globalScale();
            delta.scale(Vector2D.NULL_VECTOR, new Vector2D(1 / globalScale, 1 / globalScale));
            Vector2D newMiddle = new Vector2D(env2D.getZoomBoxMiddle());
View Full Code Here


        }

        if (area == null) {
            env2D.setZoomBox(null);
        } else {
            env2D.setZoomBox(new Rectangle2D(
                    env2D.getRealPosFromScreenPos(area.upperLeftCorner()),
                    env2D.getRealPosFromScreenPos(area.lowerRightCorner())));
        }
    }
View Full Code Here

        fieldView = env.generateEnvironmentView(
                700,
                700,
                0,
                null,
                new Rectangle2D(this.upperLeft, this.lowerRight));
        env.setShowIDs(isShowIDs);
       
//        env.setZoomBox(oldZoom);
        env.setPerfectFit(perfectFit);
       
View Full Code Here

                        i,
                        700,
                        700,
                        0,
                        null,
                        new Rectangle2D(this.upperLeft, this.lowerRight));
            } catch (Exception e) {
                pos = env.getPositionInVisualization(i);
            }
           
            if (pos != null) {
View Full Code Here

    @Override
    public void mousePressed(MouseEvent e) {
        if (LiveWindow.this.zoom) {
            try {
                if (LiveWindow.this.zoomRechteck == null) {
                    LiveWindow.this.zoomRechteck = new Rectangle2D(
                            new Vector2D(
                                    e.getX() - LiveWindow.this .getInsets().left,
                                    e.getY() - LiveWindow.this .getInsets().top),
                            new Vector2D(
                                    e.getX() - LiveWindow.this.getInsets().left,
View Full Code Here

  private Rectangle2D boundingBox;

  @Override
  public void runBeforeSimulation(final AbstractEnvironment2D<AbstractAgent2D<?>> env, final ParCollection params) {
    gridPoints = params.getParValueVector2D("gridPoints").toPoint();
    boundingBox = new Rectangle2D(new Vector2D(env.getBoundingBox(false)
        .upperLeftCorner()), new Vector2D(env.getBoundingBox(false).lowerRightCorner()));
   
    matrix = new double[gridPoints.x][gridPoints.y];
    for (int i = 0; i < matrix.length; i++) {
      for (int j = 0; j < matrix[0].length; j++) {
View Full Code Here

TOP

Related Classes of eas.math.geometry.Rectangle2D

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.