Package eas.math.geometry

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


        Vector2D xSub = new Vector2D(radius * 1.5, 0);
        Vector2D ySub = new Vector2D(0, radius * 1.5);
        Vector2D zwisch;
        zwisch = new Vector2D(linksOben);
        zwisch.sub(xSub);
        zwisch.sub(ySub);
        quad.add(zwisch);

        zwisch = new Vector2D(linksOben.x, linksOben.y + radius * 4 + radius);
        zwisch.sub(xSub);
        zwisch.translate(ySub);
View Full Code Here


        zwisch.sub(xSub);
        zwisch.sub(ySub);
        quad.add(zwisch);

        zwisch = new Vector2D(linksOben.x, linksOben.y + radius * 4 + radius);
        zwisch.sub(xSub);
        zwisch.translate(ySub);
        quad.add(zwisch);

        zwisch = new Vector2D(linksOben.x, linksOben.y + radius * 4 + radius);
        zwisch.translate(xSub);
View Full Code Here

        zwisch.translate(ySub);
        quad.add(zwisch);

        zwisch = new Vector2D(linksOben.x, linksOben.y);
        zwisch.translate(xSub);
        zwisch.sub(ySub);
        quad.add(zwisch);
       
        AusgMerkm zwAusg = new AusgMerkm(Color.black, Color.black, true, true);
        liste.add(zwAusg);
        liste.add(quad.toPol(1, Vector2D.NULL_VECTOR));
View Full Code Here

       
        Vector2D versch = new Vector2D(this.pfeilPol.get(0));
        versch.mult(-1);
       
        Vector2D anfWin = new Vector2D(this.pfeilPol.get(1));
        anfWin.sub(this.pfeilPol.get(0));
        double winkel = Math.atan(anfWin.x / anfWin.y);
       
        Polygon2D p = (new ArrowMaster(this.pars)).segmentPfeilPol2D(
                this.pfeilPol,
                this.dicken,
View Full Code Here

        final double minZoom = 0.01;
        double xF = this.getWidth();
        double yF = this.getHeight();
        final Vector2D mittVek = new Vector2D(xF / 2, yF / 2);
        final Vector2D mouse = new Vector2D(e.getPoint());
        mouse.sub(mittVek); // TODO
       
        if (e.getWheelRotation() > 0) {
            this.skalierung /= konstSkal * Math.abs(e.getWheelRotation());
        } else {
            this.skalierung *= konstSkal * Math.abs(e.getWheelRotation());
 
View Full Code Here

        Rectangle2D visibleBox = this.getCurrentViewBox();

        Polygon2D b = visibleBox.toPol2D();
        b.scale(Vector2D.NULL_VECTOR, new Vector2D(globalScale, globalScale));
        Vector2D midTranslation = new Vector2D(screenWidth / 2, screenHeight / 2);
        midTranslation.sub(b.centerPoint());
        Polygon2D bound = visibleBox.toPol2D();
        bound.scale(Vector2D.NULL_VECTOR, new Vector2D(globalScale, globalScale));
        bound.translate(midTranslation);
        return bound;
    }
View Full Code Here

        double globalScale = this.globalScale();
        Polygon2D b = visibleBox.toPol2D();
        b.scale(Vector2D.NULL_VECTOR, new Vector2D(globalScale, globalScale));
        Vector2D midTranslation = new Vector2D(screenWidth / 2, screenHeight / 2);
        midTranslation.sub(b.centerPoint());
        Rectangle2D border = new Rectangle2D(
                new Vector2D(screenLeft, screenUp),
                new Vector2D(screenWidth - screenLeft, screenHeight - screenUp));
        Polygon2D bound = visibleBox.toPol2D();
        bound.scale(Vector2D.NULL_VECTOR, new Vector2D(globalScale, globalScale));
View Full Code Here

    public synchronized void setZoomBoxMiddle(final Vector2D middle) {
        if (this.zoomBox == null || middle == null) {
            return;
        } else {
            Vector2D move = new Vector2D(middle);
            move.sub(this.zoomBox.middle());
            this.zoomBox.translate(move);
            this.redrawGrid = true;
            this.requestRedraw();
        }
    }
View Full Code Here

  private Pixel2D_24Bit getPixelAt(Vector2D pos, BufferedImage img, Vector2D imgPos){
    Vector2D posInImg = new Vector2D(pos);

    if (img != null && imgPos != null) {
      posInImg.sub(imgPos);

      if (posInImg.x > 0 && posInImg.x < img.getWidth()
          && posInImg.y > 0 && posInImg.y < img.getHeight()) {
       
        int[] rgb = new int[3];       
View Full Code Here

                        Vector2D vecTemp = new Vector2D(v);
                        d.mult(3);
                        vecTemp.translate(d);
                        v = this.getPointInVisualization(v);
                        vecTemp = this.getPointInVisualization(vecTemp);
                        d = vecTemp.sub(v);
                       
                        g.fillOval((int) v.x - 5, (int) v.y - 5, 10, 10);
                       
                        Vector2D p1 = this.getPointInVisualization(new Vector2D(
                                planePoint1.x * heightProfileGridWidth + heightProfileBoundingBox.upperLeftCorner().x,
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.