Examples of Polygon2D


Examples of eas.math.geometry.Polygon2D

   
    private static Polygon2D jasmineShape;
   
    public static Polygon2D getJasmineShape() {
        if (jasmineShape == null) {
            jasmineShape = new Polygon2D();
            jasmineShape.add(new Vector2D(
                    0,
                    0));
            jasmineShape.add(new Vector2D(
                    ConstantsSimulation.ROB_AUSDEHNUNG_X,
View Full Code Here

Examples of eas.math.geometry.Polygon2D

    @Override
    public Polygon2D getAgentShape() {
        if (pol == null) {
            final double precision = 17;
            final double radius = 7;
            pol = new Polygon2D();

            for (double d = 0; d < Math.PI * 2; d += Math.PI * 2 / precision) {
                pol.add(new Vector2D(Math.sin(d) * radius, Math.cos(d) * radius));
            }
        }
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(0, 0));
            shape.add(new Vector2D(40, 0));
            shape.add(new Vector2D(40, 2));
            shape.add(new Vector2D(0, 2));
        }
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(0, 0));
            shape.add(new Vector2D(100, 0));
            shape.add(new Vector2D(100, 2));
            shape.add(new Vector2D(0, 2));
        }
View Full Code Here

Examples of eas.math.geometry.Polygon2D

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

Examples of eas.math.geometry.Polygon2D

     *
     */
    private static final long serialVersionUID = -9097007422935549253L;

    public Shape polToShape(final Polygon2D polygon) {
        Polygon2D pol = polygon.getCounterClockwiseOrdered();
       
        ROVector2f[] vecs = new ROVector2f[pol.nPoints()];
       
        for (int i = 0; i < pol.nPoints(); i++) {
            vecs[i] = new Vector2f((float) pol.get(i).x, (float) pol.get(i).y);
        }
       
        Polygon p = new Polygon(vecs);
        return p;
    }
View Full Code Here

Examples of eas.math.geometry.Polygon2D

            shape.add(new Vector2D(5, 0));
            shape.add(new Vector2D(5, 2));
            shape.add(new Vector2D(-5, 2));
            shape.translateRootPointToMiddle(); */
           
            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

   
  /* Form des Körpers */
  @Override
  public synchronized 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

   
  /* Form des Körpers */
  @Override
  public synchronized 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

                   
                    Color c = new Color(a, 100, 100, 100);
                   
                    g.setColor(c);
                   
                    Polygon2D p = new Polygon2D();
                    p.add(v1);
                    p.add(new Vector2D(v1.x, v1.y + this.heightProfileGridHeight));
                    p.add(new Vector2D(v1.x + this.heightProfileGridWidth, v1.y + this.heightProfileGridHeight));
                    p.add(new Vector2D(v1.x + this.heightProfileGridWidth, v1.y));
                    p = this.getPolygonInVisualization(p);
                    Polygon pol = p.toPol();
                   
                    g.drawPolygon(pol);
                    g.fillPolygon(pol);
                    g.drawLine(pol.xpoints[0], pol.ypoints[0], pol.xpoints[2], pol.ypoints[2]);
                }
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.