Package eas.math.geometry

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


    }
   
    @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

       
        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

    private Polygon2D shape;

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

    @Override
    public synchronized Polygon2D getAgentShape() {
        // Auto-generated polygon code by Arrow Master (60 points)
        if (pol == null) {
            pol = new Polygon2D();
            pol.add(new Vector2D(49.0, 208.0));
            pol.add(new Vector2D(68.0, 208.0));
            pol.add(new Vector2D(111.0, 189.0));
            pol.add(new Vector2D(152.0, 207.0));
            pol.add(new Vector2D(203.0, 207.0));
View Full Code Here

        super(id, env, m, params);
    }

    @Override
    public Polygon2D getAgentShape() {
        Polygon2D p2 = new Polygon2D();
       
        p2.add(new Vector2D(-100, 10));
        p2.add(new Vector2D(100, 10));
        p2.add(new Vector2D(130, 0));
        p2.add(new Vector2D(100, -10));
        p2.add(new Vector2D(-100, -10));
       
        return p2;
    }
View Full Code Here

    @Override
    public Polygon2D getAgentShape() {
        if (pacman == null) {
            final double precision = 10;
            final double radius = 0.5;
            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

    public Polygon2D getAgentShape() {
        if (pol == null) {
            final double precision = 9;
            final double radiusX = 2;
            final double radiusY = 2.5;
            pol = new Polygon2D();
           
            for (double d = 0; d < Math.PI * 2; d += Math.PI * 2 / precision) {
                pol.add(new Vector2D(Math.sin(d) * radiusY, Math.cos(d) * radiusX));
            }
        }
View Full Code Here

  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

 
  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

TOP

Related Classes of eas.math.geometry.Polygon2D

Copyright © 2018 www.massapicom. 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.