/*
- * Sixth 3D engine. Author: Svjatoslav Agejenko.
+ * Sixth 3D engine. Author: Svjatoslav Agejenko.
* This project is released under Creative Commons Zero (CC0) license.
- *
-*
*/
-
package eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.texturedpolygon;
import eu.svjatoslav.sixth.e3d.geometry.Point2D;
* 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,
final PolygonCoordinate pc2, final PolygonCoordinate pc3,
final Texture texture) {
- this(pc1.space, pc2.space, pc3.space, pc1.texture, pc2.texture,
- pc3.texture, texture);
+ this(pc1.spaceCoordinate, pc2.spaceCoordinate, pc3.spaceCoordinate, pc1.textureCoordinate, pc2.textureCoordinate,
+ pc3.textureCoordinate, texture);
}
private void computeTotalTextureDistance() {
if (pointWithinPolygon(
renderBuffer.getMouseEvent().coordinate, projectedPoint1,
projectedPoint2, projectedPoint3))
- renderBuffer.setObjectUnderMouse(mouseInteractionController);
+ renderBuffer.setCurrentObjectUnderMouseCursor(mouseInteractionController);
// Show polygon boundaries (for debugging)
if (showBorders)