Package eas.math.geometry

Examples of eas.math.geometry.Rectangle2D.upperLeftCorner()


        Rectangle2D zb;
        Rectangle2D currentBound = this.getCurrentViewBox();
        Vector2D middle = new Vector2D(this.getZoomBoxMiddle());
       
        zb = new Rectangle2D(
                new Vector2D(currentBound.upperLeftCorner()),
                new Vector2D(currentBound.lowerRightCorner()));
       
        zb.scale(Vector2D.NULL_VECTOR, new Vector2D(scale, scale));
       
        this.setZoomBox(zb);
View Full Code Here


        }

        Rectangle2D clip = this.getClippingRectangle();
       
        g.clipRect(
                (int) clip.upperLeftCorner().x,
                (int) clip.upperLeftCorner().y,
                (int) clip.lowerRightCorner().x,
                (int) clip.lowerRightCorner().y);

        /*
 
View Full Code Here

        Rectangle2D clip = this.getClippingRectangle();
       
        g.clipRect(
                (int) clip.upperLeftCorner().x,
                (int) clip.upperLeftCorner().y,
                (int) clip.lowerRightCorner().x,
                (int) clip.lowerRightCorner().y);

        /*
         * Add visualization of non-visualized grid objects (i.e., all that
View Full Code Here

            return;
        }
       
        // If bounding box changed (==> refresh and reset tile coordinates).
        if (this.oldBoundingBox == null
                || Math.abs(this.oldBoundingBox.upperLeftCorner().x - newBoundingBox.upperLeftCorner().x) > epsilon
                || Math.abs(this.oldBoundingBox.upperLeftCorner().y - newBoundingBox.upperLeftCorner().y) > epsilon
                || Math.abs(this.oldBoundingBox.lowerRightCorner().x - newBoundingBox.lowerRightCorner().x) > epsilon
                || Math.abs(this.oldBoundingBox.lowerRightCorner().y - newBoundingBox.lowerRightCorner().y) > epsilon) {
            double x1 = newBoundingBox.upperLeftCorner().x - boundingBuffer.x,
                   x2 = newBoundingBox.lowerRightCorner().x + boundingBuffer.x,
View Full Code Here

        }
       
        // If bounding box changed (==> refresh and reset tile coordinates).
        if (this.oldBoundingBox == null
                || Math.abs(this.oldBoundingBox.upperLeftCorner().x - newBoundingBox.upperLeftCorner().x) > epsilon
                || Math.abs(this.oldBoundingBox.upperLeftCorner().y - newBoundingBox.upperLeftCorner().y) > epsilon
                || Math.abs(this.oldBoundingBox.lowerRightCorner().x - newBoundingBox.lowerRightCorner().x) > epsilon
                || Math.abs(this.oldBoundingBox.lowerRightCorner().y - newBoundingBox.lowerRightCorner().y) > epsilon) {
            double x1 = newBoundingBox.upperLeftCorner().x - boundingBuffer.x,
                   x2 = newBoundingBox.lowerRightCorner().x + boundingBuffer.x,
                   y1 = newBoundingBox.upperLeftCorner().y - boundingBuffer.y,
View Full Code Here

        if (this.oldBoundingBox == null
                || Math.abs(this.oldBoundingBox.upperLeftCorner().x - newBoundingBox.upperLeftCorner().x) > epsilon
                || Math.abs(this.oldBoundingBox.upperLeftCorner().y - newBoundingBox.upperLeftCorner().y) > epsilon
                || Math.abs(this.oldBoundingBox.lowerRightCorner().x - newBoundingBox.lowerRightCorner().x) > epsilon
                || Math.abs(this.oldBoundingBox.lowerRightCorner().y - newBoundingBox.lowerRightCorner().y) > epsilon) {
            double x1 = newBoundingBox.upperLeftCorner().x - boundingBuffer.x,
                   x2 = newBoundingBox.lowerRightCorner().x + boundingBuffer.x,
                   y1 = newBoundingBox.upperLeftCorner().y - boundingBuffer.y,
                   y2 = newBoundingBox.lowerRightCorner().y + boundingBuffer.y;
//            System.out.println("bound");
            tiles = new LinkedList[tileNumHorizontally][tileNumVertically];
View Full Code Here

                || Math.abs(this.oldBoundingBox.upperLeftCorner().y - newBoundingBox.upperLeftCorner().y) > epsilon
                || Math.abs(this.oldBoundingBox.lowerRightCorner().x - newBoundingBox.lowerRightCorner().x) > epsilon
                || Math.abs(this.oldBoundingBox.lowerRightCorner().y - newBoundingBox.lowerRightCorner().y) > epsilon) {
            double x1 = newBoundingBox.upperLeftCorner().x - boundingBuffer.x,
                   x2 = newBoundingBox.lowerRightCorner().x + boundingBuffer.x,
                   y1 = newBoundingBox.upperLeftCorner().y - boundingBuffer.y,
                   y2 = newBoundingBox.lowerRightCorner().y + boundingBuffer.y;
//            System.out.println("bound");
            tiles = new LinkedList[tileNumHorizontally][tileNumVertically];
            this.localBoundingBox = new Rectangle2D(new Vector2D(x1, y1), new Vector2D(x2, y2));
            this.oldBoundingBox = new Rectangle2D(newBoundingBox);
View Full Code Here

        try {
            Rectangle2D rect;
            rect = ((AbstractEnvironment2D) env).getClippingRectangle();
            g.setClip(
                    (int) rect.upperLeftCorner().x,
                    (int) rect.upperLeftCorner().y,
                    (int) (rect.upperLeftCorner().x + rect.getWidth()),
                    (int) (rect.upperLeftCorner().y + rect.getHeight()));
        } catch (Exception e1) {
        }
View Full Code Here

        try {
            Rectangle2D rect;
            rect = ((AbstractEnvironment2D) env).getClippingRectangle();
            g.setClip(
                    (int) rect.upperLeftCorner().x,
                    (int) rect.upperLeftCorner().y,
                    (int) (rect.upperLeftCorner().x + rect.getWidth()),
                    (int) (rect.upperLeftCorner().y + rect.getHeight()));
        } catch (Exception e1) {
        }
       
View Full Code Here

            Rectangle2D rect;
            rect = ((AbstractEnvironment2D) env).getClippingRectangle();
            g.setClip(
                    (int) rect.upperLeftCorner().x,
                    (int) rect.upperLeftCorner().y,
                    (int) (rect.upperLeftCorner().x + rect.getWidth()),
                    (int) (rect.upperLeftCorner().y + rect.getHeight()));
        } catch (Exception e1) {
        }
       
        AbstractAgent bester = this.bester(env.getAgents());
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.