Package eas.math.geometry

Examples of eas.math.geometry.Polygon2D




    @Override
    public Polygon2D getAgentShape() {
        Polygon2D p = new Polygon2D();
        p.add(new Vector2D(-5, -30));
        p.add(new Vector2D(5, -30));
        p.add(new Vector2D(5, 30));
        p.add(new Vector2D(-5, 30));
        return p;
    }
View Full Code Here


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

                        && 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

        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

      }
          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

   */
  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

                        && 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

    @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

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

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.