1 package de.lathanda.eos.game.geom;
43 throw new RuntimeException(
"unknown outline typ!");
58 throw new RuntimeException(
"unknown outline typ!");
63 throw new RuntimeException(
"unknown outline typ!");
65 throw new RuntimeException(
"unknown outline typ!");
77 double distance = Double.POSITIVE_INFINITY;
91 private static double polygonPolygon(Polygon p1, Polygon p2) {
93 if (p1.intersects(p2)) {
95 for (
int i = p1.coordinates_final_x.length; i-- > 0;) {
97 p1.coordinates_final_x[i],
98 p1.coordinates_final_y[i]));
100 for (
int i = p2.coordinates_final_x.length; i-- > 0;) {
102 p2.coordinates_final_x[i],
103 p2.coordinates_final_y[i]));
107 distance = Double.POSITIVE_INFINITY;
108 for (
int i = p1.coordinates_final_x.length; i-- > 0;) {
110 p1.coordinates_final_x[i],
111 p1.coordinates_final_y[i]));
113 for (
int i = p2.coordinates_final_x.length; i-- > 0;) {
115 p2.coordinates_final_x[i],
116 p2.coordinates_final_y[i]));
static double distance(Shape a, Shape b)
double getDistance(double x, double y)
double getDistance(double x, double y)
ArrayList< Shape > getOutlines()
abstract Types getOutlineType()
final double getDistance(Point p)