예제 #1
0
 /** Draws a kind of compass, showing the world axis */
 private void drawMouseWorldAxis() {
   Vector3 v = cursorWorldPosition;
   if (!Float.isNaN(v.x + v.y + v.z)) { // No vector component is NaN
     shapeRenderer.begin();
     shapeRenderer.line(v.x, v.y, v.z, v.x + 1, v.y, v.z, Color.RED, Color.RED);
     shapeRenderer.line(v.x, v.y, v.z, v.x, v.y + 1, v.z, Color.GREEN, Color.GREEN);
     shapeRenderer.line(v.x, v.y, v.z, v.x, v.y, v.z + 1, Color.BLUE, Color.BLUE);
     shapeRenderer.end();
   }
 }