X-Git-Url: http://www2.svjatoslav.eu/gitweb/?p=sixth-3d.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Frenderer%2Fraster%2Fshapes%2Fbasic%2Fsolidpolygon%2FSolidPolygon.java;h=e45a99108b3aac5b9faaac5ad13b7bc657482018;hp=992a4060f9c64c3f89226090240a35d3c59e6037;hb=9dcd9d8a7d3bc16eb6fde3681cd32e02dc0707e9;hpb=dcdff57f0bab42387b2e4e215778d9e8efc60221 diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/basic/solidpolygon/SolidPolygon.java b/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/basic/solidpolygon/SolidPolygon.java index 992a406..e45a991 100644 --- a/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/basic/solidpolygon/SolidPolygon.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/basic/solidpolygon/SolidPolygon.java @@ -19,9 +19,9 @@ import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractCoordinateShape; public class SolidPolygon extends AbstractCoordinateShape { - final static LineInterpolator polygonBoundary1 = new LineInterpolator(); - final static LineInterpolator polygonBoundary2 = new LineInterpolator(); - final static LineInterpolator polygonBoundary3 = new LineInterpolator(); + private final static LineInterpolator polygonBoundary1 = new LineInterpolator(); + private final static LineInterpolator polygonBoundary2 = new LineInterpolator(); + private final static LineInterpolator polygonBoundary3 = new LineInterpolator(); private Color color; public SolidPolygon(final Point3D point1, final Point3D point2, @@ -52,7 +52,7 @@ public class SolidPolygon extends AbstractCoordinateShape { final int width = x2 - x1; int offset = ((y * renderBuffer.width) + x1) * 4; - final byte[] offSreenBufferBytes = renderBuffer.bytes; + final byte[] offSreenBufferBytes = renderBuffer.pixels; final int polygonAlpha = color.a; final int b = color.b; @@ -103,10 +103,10 @@ public class SolidPolygon extends AbstractCoordinateShape { onScreenPoint3.roundToInteger(); if (mouseInteractionController != null) - if (context.mouseClick != null) - if (Polygon.pointWithinPolygon(context.mouseClick.coordinate, + if (context.mouseEvent != null) + if (Polygon.pointWithinPolygon(context.mouseEvent.coordinate, onScreenPoint1, onScreenPoint2, onScreenPoint3)) - context.clickedItem = mouseInteractionController; + context.objectUnderMouse = mouseInteractionController; if (color.isTransparent()) return;