title: javafx polygon's collision
body: <p>i have 2 spaceships. both have polygons. (hitbox) spaceships can be rotated. sooo bounds don't work. </p>
  
  <p>my way to find intersects: </p>
  
  <pre><code>  if (hitbox.intersects(enemyHitbox.getBoundsInLocal())){
  
              for (int i = 0; i &lt; enemy.length; i++) {
                  if (hitbox.contains(enemy[i].getX(), enemy[i].getY())) {
                      System.out.println("HIT");
                  } else if (enemyHitbox.contains(p1)) {
                      System.out.println("HIT p1");
                  } else if (enemyHitbox.contains(p2)) {
                      System.out.println("HIT p2");
                  }  else {
                  }
              }
          }
  </code></pre>
  
  <p>but... there is a problems. when real intersect, but vertex not inside polygon (imagine 2 triangles. 1st have angle 0 and 2nd 180. )</p>
  
  <p>Is there any way to fix? 
  Maybe java have some solution for that?</p>