Benutzer-Werkzeuge

Webseiten-Werkzeuge


api:documentation:math:start

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
Letzte ÜberarbeitungBeide Seiten der Revision
api:documentation:math:start [2021/05/31 17:30] – [MathTools.intersectCircleWithPolygon] Martin Pabstapi:documentation:math:start [2021/12/29 11:29] – Externe Bearbeitung 127.0.0.1
Zeile 21: Zeile 21:
 <HTML> <HTML>
  
-<div class="java-online" style="height: 300px; width: 90%" data-java-online="{'withBottomPanel': false, 'id': 'IntersectCircleWithPolygon'}">+<div class="java-online" style="height: 300px; width: 90%" data-java-online="{'withBottomPanel': false, 'id': 'IntersectCircleWithPolygon', 'speed': 'max'}">
  
 <script type="text/plain" title="IntersectCircleWithPolygon.java"> <script type="text/plain" title="IntersectCircleWithPolygon.java">
Zeile 36: Zeile 36:
       intersectionPoints.bringToFront();       intersectionPoints.bringToFront();
       calculateIntersections();       calculateIntersections();
 +   }
 +
 +   void calculateIntersections() {
 +
 +      Vector2[] points = MathTools.intersectCircleWithPolygon(getCenterX(), getCenterY(), getRadius(), p.getHitPolygon());
 +      intersectionPoints.destroyAllChildren();
 +      for(Vector2 point : points) {
 +         Circle p = new Circle(point.x, point.y, 5);
 +         p.setFillColor(Color.red);
 +         intersectionPoints.add(p);
 +      }
 +
    }    }
  
Zeile 59: Zeile 71:
          calculateIntersections();          calculateIntersections();
       }       }
-   } 
- 
-   void calculateIntersections() { 
- 
-      Vector2[] points = MathTools.intersectCircleWithPolygon(getCenterX(), getCenterY(), getRadius(), p.getHitPolygon()); 
-      intersectionPoints.destroyAllChildren(); 
-      for(Vector2 point : points) { 
-         Circle p = new Circle(point.x, point.y, 5); 
-         p.setFillColor(Color.red); 
-         intersectionPoints.add(p); 
-      } 
- 
    }    }
 } }
api/documentation/math/start.txt · Zuletzt geändert: 2022/01/10 07:25 von Martin Pabst

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki