Examples of centerPoint()


Examples of eas.math.geometry.Polygon2D.centerPoint()

        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

Examples of eas.math.geometry.Polygon2D.centerPoint()

                        ArrowMaster.EINFACHER_ABSCHLUSS,
                        ArrowMaster.KUGEL_ENDE,
                        new Vector2D(1, 1),
                        new Vector2D(0.45, 0.45));
       
        pol.rotate(pol.centerPoint(), Math.PI);
        pol = pol.normalize(GlobalVariables.getPrematureParameters());
       
        Polygon2D pol2 =
                new ArrowMaster(GlobalVariables.getPrematureParameters()).segmentPfeilPol2D(
                        pol,
View Full Code Here

Examples of eas.math.geometry.Polygon2D.centerPoint()

        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

Examples of eas.math.geometry.Polygon2D.centerPoint()

        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

Examples of eas.math.geometry.Polygon2D.centerPoint()

                    xTarget = polTarget.getBoundingBox().upperLeftCorner().x - pfeilSpitze.getBoundingBox().getWidth();
                } else if (i < link.getSourceNeuronID()) {
                    ySource = polSource.getBoundingBox().upperLeftCorner().y;
                    xTarget = polTarget.getBoundingBox().lowerRightCorner().x + pfeilSpitze.getBoundingBox().getWidth();
                } else { // ==
                    weightPosSelf = new Vector2D(polSource.centerPoint().x - 1, polSource.centerPoint().y - 1.075);
                }
               
                Polygon2D punkte = new Polygon2D();
                punkte.add(new Vector2D(xSource, ySource));
                punkte.add(new Vector2D(xSource, yTarget));
View Full Code Here

Examples of eas.math.geometry.Polygon2D.centerPoint()

                    xTarget = polTarget.getBoundingBox().upperLeftCorner().x - pfeilSpitze.getBoundingBox().getWidth();
                } else if (i < link.getSourceNeuronID()) {
                    ySource = polSource.getBoundingBox().upperLeftCorner().y;
                    xTarget = polTarget.getBoundingBox().lowerRightCorner().x + pfeilSpitze.getBoundingBox().getWidth();
                } else { // ==
                    weightPosSelf = new Vector2D(polSource.centerPoint().x - 1, polSource.centerPoint().y - 1.075);
                }
               
                Polygon2D punkte = new Polygon2D();
                punkte.add(new Vector2D(xSource, ySource));
                punkte.add(new Vector2D(xSource, yTarget));
View Full Code Here

Examples of eas.math.geometry.Polygon2D.centerPoint()

        if (showTiles) {
        for (int i = 0; i < this.tileNumHorizontally; i++) {
                for (int j = 0; j < this.tileNumVertically; j++) {
                    Rectangle2D r = this.getTileRectangle(new Vector2D(i, j));
                    Polygon2D polInVis = super.getPolygonInVisualization(r.toPol2D());
                    Vector2D pos = polInVis.centerPoint();
                    g.setColor(Color.orange);
                    g.drawPolygon(polInVis.toPol());
//                    g.drawString(i + " / " + j, (float) pos.x, (float) pos.y);
                    g.drawString("" + this.getAgentsTouchingTile(new Vector2D(i, j)).size(), (float) pos.x, (float) pos.y);
                }
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.