Examples of Polygon2D


Examples of eas.math.geometry.Polygon2D

        shape.add(new Vector2D(0.00001, -0.00001));
        shape.add(new Vector2D(0, 0.00001)); */
       
       
       
        shape = new Polygon2D();
        shape.add(new Vector2D(-0.25, -0.25));
          shape.add(new Vector2D(0.25, -0.25));
          shape.add(new Vector2D(0, 0.5));
       
       
View Full Code Here

Examples of eas.math.geometry.Polygon2D

      }
          return shape;
  }
   
    public void setAgentShapeBIG() {
      shape = new Polygon2D();
    shape.add(new Vector2D(-2.5, -2.5));
    shape.add(new Vector2D(2.5, -2.5));
    shape.add(new Vector2D(0, 5));
    }
View Full Code Here

Examples of eas.math.geometry.Polygon2D

   */
  private Polygon2D shape;
  @Override
  public Polygon2D getAgentShape() {
 
  shape = new Polygon2D();
  shape.add(new Vector2D(0.5, 0.5));
  shape.add(new Vector2D(-0.5, 0.5));
  shape.add(new Vector2D(-0.5, -0.5));
  shape.add(new Vector2D(0.5, -0.5));
 
View Full Code Here

Examples of eas.math.geometry.Polygon2D

                        && feldPix[i][j] != ConstantsSimulation.FARBE_INP_GEG
                        && feldPix[i][j] != ConstantsSimulation.FARBE_INP_TABU) {
                    dynFarbe = feldPix[i][j] - Byte.MIN_VALUE;

                    if (this.dynWaende[dynFarbe] == null) {
                        this.dynWaende[dynFarbe] = new Polygon2D();
                        this.dynVersch[dynFarbe] = new Vector2D(0, 0);
                        this.dynOldVersch[dynFarbe] = new Vector2D(0, 0);
                        this.dynGesetzt[dynFarbe] = false;
                        this.tatdynDrehMittPkt[dynFarbe]
                                  = new Vector2D(Vector2D.NULL_VECTOR);
View Full Code Here

Examples of eas.math.geometry.Polygon2D

    @Override
    public Polygon2D getAgentShape() {
        if (pacman == null) {
            final double precision = 40;
            final double radius = 1;
            pacman = new Polygon2D();
           
            for (double d = 0; d < Math.PI * 1.75; d += Math.PI * 2 / precision) {
                pacman.add(new Vector2D(Math.sin(d) * radius, Math.cos(d) * radius));
            }
            pacman.add(new Vector2D(0, 0));
View Full Code Here

Examples of eas.math.geometry.Polygon2D

    private Polygon2D shape;
   
    @Override
    public Polygon2D getAgentShape() {
        if (shape == null) {
            shape = new Polygon2D();
            shape.add(new Vector2D(0.5, 0.5));
            shape.add(new Vector2D(-0.5, 0.5));
            shape.add(new Vector2D(-0.5, -0.5));
            shape.add(new Vector2D(0.5, -0.5));
        }
View Full Code Here

Examples of eas.math.geometry.Polygon2D

    private Polygon2D shape;
   
    @Override
    public synchronized Polygon2D getAgentShape() {
        if (shape == null) {
            shape = new Polygon2D();
            shape.add(new Vector2D(-5, -5));
            shape.add(new Vector2D(0, 5));
            shape.add(new Vector2D(5, -5));
        }
        return shape;
View Full Code Here

Examples of eas.math.geometry.Polygon2D

    private Polygon2D shape;
   
    @Override
    public strictfp Polygon2D getAgentShape() {
        if (shape == null) {
            shape = new Polygon2D();
            shape.add(new Vector2D(-50, 0));
            shape.add(new Vector2D(50, 0));
            shape.add(new Vector2D(50, 2));
            shape.add(new Vector2D(-50, 2));
            shape.translateRootPointToMiddle();
View Full Code Here

Examples of eas.math.geometry.Polygon2D

    }
   
    @Override
    public Polygon2D getAgentShape() {
        if (pol == null) {
            pol = new Polygon2D();
            pol.add(new Vector2D(-this.ausd.x / 2, -this.ausd.y / 2));
            pol.add(new Vector2D(+this.ausd.x / 2, -this.ausd.y / 2));
            pol.add(new Vector2D(+this.ausd.x / 2, +this.ausd.y / 2));
            pol.add(new Vector2D(-this.ausd.x / 2, +this.ausd.y / 2));
        }
View Full Code Here

Examples of eas.math.geometry.Polygon2D

       
        return pol;
    }

    public Polygon2D getEckp() {
        Polygon2D pol;
       
        if (!this.eckPunkteAktuell) {
            this.berechneEckpunkte();
        }

        pol = new Polygon2D();
       
        for (Vector2D ecke : this.eckPunkte) {
            pol.add(ecke);
        }
       
        return pol;
    }
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.