Examples of Vektor2D


Examples of fmg.fmg8.umgebung2D.Vektor2D

       
        if (this.pfeilPol.getBoundingBox() == null) {
            return;
        }
       
        Vektor2D pLO
            = new Vektor2D(this.pfeilPol.getBoundingBox().getLinkObEcke());
        Vektor2D pRU
            = new Vektor2D(this.pfeilPol.getBoundingBox().getRechtUntEcke());
       
        Vektor2D neuVersch = new Vektor2D(xF / 2, yF / 2);
        Vektor2D zwisch = new Vektor2D(pLO);
        zwisch.add(new Vektor2D((pRU.x - pLO.x) / 2, (pRU.y - pLO.y) / 2));
        zwisch.mult(skalierung);
        neuVersch.sub(zwisch);
        this.verschiebung = neuVersch;
    }
View Full Code Here

Examples of fmg.fmg8.umgebung2D.Vektor2D

    @Override
    public void verschNachUm(
            final Umgebung umg,
            final long simZyk,
            final Parametersatz params) {
        Vektor2D mitte1, mitte2;
        double abstand1, abstand2;
        int bef0;
        String befehl0;
        final int umschCons = 100000;
View Full Code Here

Examples of fmg.fmg8.umgebung2D.Vektor2D

    @Override
    public void verschNachUm(
            final Umgebung umg,
            final long simZyk,
            final Parametersatz params) {
        Vektor2D mitte1, mitte2;
        double abstand1, abstand2;
        int bef0;
        String befehl0;

        this.verschVorUm(umg, simZyk, params);
View Full Code Here

Examples of fmg.fmg8.umgebung2D.Vektor2D

                    }
                }
            }
        }
       
        this.rahmenLinksOben = new Vektor2D(minX, minY);
        this.rahmenRechtsUnten = new Vektor2D(maxX, maxY);
    }
View Full Code Here

Examples of fmg.fmg8.umgebung2D.Vektor2D

    @Override
    public void verschNachUm(
            final Umgebung umg,
            final long simZyk,
            final Parametersatz params) {
        Vektor2D mitte1, mitte2;
        double abstand1, abstand2;
        int bef0;
        String befehl0;
        final int umschCons = 100000;
View Full Code Here

Examples of fmg.fmg8.umgebung2D.Vektor2D

    @Override
    public void verschVorUm(
            final Umgebung umg,
            final long simZyk,
            final Parametersatz params) {
        umg.verschWand(17, new Vektor2D(-60, 0));
    }
View Full Code Here

Examples of fmg.fmg8.umgebung2D.Vektor2D

        // Swap:
        int fitSwap;
       
        if (rob.getLetztKoord() == null) {
            rob.setLetztKoord(new Vektor2D(rob.getPosition()));
        }
       
        if (this.haelfte(rob.getUmg(), rob.getLetztKoord())
            != this.haelfte(rob.getUmg(), rob.getPosition())) {
            if (rob.getPosition().x <= feld.length / 7
                || rob.getPosition().x >= feld.length * 6 / 7) {
                fitSwap = 50;
                rob.setLetztKoord(new Vektor2D(rob.getPosition()));
            } else {
                fitSwap = 10;
            }
        } else {
            fitSwap = -1;
View Full Code Here

Examples of fmg.fmg8.umgebung2D.Vektor2D

        // Swap:
        int fitSwap;
       
        if (rob.getLetztKoord() == null) {
            rob.setLetztKoord(new Vektor2D(rob.getPosition()));
        }
       
        if (this.haelfte(rob.getUmg(), rob.getLetztKoord())
            != this.haelfte(rob.getUmg(), rob.getPosition())) {
            fitSwap = 10;
            GlobaleVariablen.setGateCount(GlobaleVariablen.getGateCount() + 1);
        } else {
            fitSwap = 0;
        }

        rob.setLetztKoord(new Vektor2D(rob.getPosition()));
       
        return fitSwap + fitCollAvoid - fitKoll;
    }
View Full Code Here

Examples of fmg.fmg8.umgebung2D.Vektor2D

    public int fitness(final Roboter rob) {

        // Wall-Follow:
        final double epsilon = 0.1;
        int wf = 0;
        Vektor2D blick = new Vektor2D(rob.getBlickrichtung());
        blick.normal();
//        if (Math.abs(blick.y) < epsilon) {
        if (Math.abs(blick.x) < epsilon || Math.abs(blick.y) < epsilon) {
            wf++;
        } else {
            wf--;
View Full Code Here

Examples of fmg.fmg8.umgebung2D.Vektor2D

        int faktor = (int) aktivSeitLetzt / 10;

        rob.resetAktivZyk(rob.getAktAutNum());
       
        if (rob.getLetztKoord() == null) {
            rob.setLetztKoord(new Vektor2D(rob.getPosition()));
        }
       
        if (this.haelfte(rob.getUmg(), rob.getLetztKoord())
            != this.haelfte(rob.getUmg(), rob.getPosition())) {
            fitSwap = 10;
            GlobaleVariablen.setGateCount(GlobaleVariablen.getGateCount() + 1);
        } else {
            fitSwap = -1;
        }
       
        rob.setLetztKoord(new Vektor2D(rob.getPosition()));
       
        return fitSwap * faktor;
    }
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.