Improved code readability. Components now aware of what mouse button was clicked.
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / renderer / raster / shapes / basic / texturedpolygon / TexturedPolygon.java
index 889acda..7a6f2bf 100644 (file)
@@ -26,7 +26,12 @@ public class TexturedPolygon extends AbstractCoordinateShape {
      * Polygon texture coordinates.
      */
     public Point2D texturePoint1, texturePoint2, texturePoint3;
-    private boolean showBorders = false;
+
+    /**
+     * If <code>true</code> then polygon borders will be drawn.
+     * It is used for debugging purposes.
+     */
+    public boolean showBorders = false;
     private double totalTextureDistance = -1;
 
     public TexturedPolygon(final Point3D p1, final Point3D p2,
@@ -140,7 +145,7 @@ public class TexturedPolygon extends AbstractCoordinateShape {
                 if (pointWithinPolygon(
                         renderBuffer.getMouseEvent().coordinate, projectedPoint1,
                         projectedPoint2, projectedPoint3))
-                    renderBuffer.setObjectUnderMouse(mouseInteractionController);
+                    renderBuffer.setCurrentObjectUnderMouseCursor(mouseInteractionController);
 
         // Show polygon boundaries (for debugging)
         if (showBorders)