Example #1
0
 public JsonObject centroideJSON(String centroide) {
   HashMap<String, String> hash = GeomUtil.toHashGeo(centroide);
   JsonObjectBuilder geo =
       Json.createObjectBuilder()
           .add("centroide", GeomUtil.toGeojson(hash.get("coordinates"), hash.get("type")));
   return geo.build();
 }
Example #2
0
 private boolean rectRoundCollisionCheck(
     float x, float y, float radius, ReadableRectangle bounds) {
   return GeomUtil.circleRectCollision(
       x, y, radius, bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight());
 }