X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Frenderer%2Fraster%2Fshapes%2Fcomposite%2FTexturedRectangle.java;h=e5e3e18c5e66a4d26118dbc8f7530ab6be7e6e15;hb=HEAD;hp=208922d9c1ef2fb7275518e993e4a8e902da19fe;hpb=59baa428fb2d9e7f0fe5423f4cea47f2d6245914;p=sixth-3d.git diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/composite/TexturedRectangle.java b/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/composite/TexturedRectangle.java index 208922d..e5e3e18 100644 --- a/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/composite/TexturedRectangle.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/composite/TexturedRectangle.java @@ -1,17 +1,13 @@ /* - * Sixth 3D engine. Copyright ©2012-2019, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 3 of the GNU Lesser General Public License - * or later as published by the Free Software Foundation. - * + * Sixth 3D engine. Author: Svjatoslav Agejenko. + * This project is released under Creative Commons Zero (CC0) license. */ - package eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite; import eu.svjatoslav.sixth.e3d.geometry.Point2D; import eu.svjatoslav.sixth.e3d.geometry.Point3D; import eu.svjatoslav.sixth.e3d.math.Transform; +import eu.svjatoslav.sixth.e3d.math.Vertex; import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.texturedpolygon.TexturedPolygon; import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape; import eu.svjatoslav.sixth.e3d.renderer.raster.texture.Texture; @@ -67,16 +63,21 @@ public class TexturedRectangle extends AbstractCompositeShape { textureBottomRight = new Point2D(textureWidth, textureHeight); textureBottomLeft = new Point2D(0, textureHeight); - final TexturedPolygon texturedPolygon1 = new TexturedPolygon(topLeft, - topRight, bottomRight, textureTopLeft, textureTopRight, - textureBottomRight, texture); + + + + final TexturedPolygon texturedPolygon1 = new TexturedPolygon( + new Vertex(topLeft, textureTopLeft), + new Vertex(topRight, textureTopRight), + new Vertex(bottomRight, textureBottomRight), texture); texturedPolygon1 .setMouseInteractionController(mouseInteractionController); - final TexturedPolygon texturedPolygon2 = new TexturedPolygon(topLeft, - bottomLeft, bottomRight, textureTopLeft, textureBottomLeft, - textureBottomRight, texture); + final TexturedPolygon texturedPolygon2 = new TexturedPolygon( + new Vertex(topLeft, textureTopLeft), + new Vertex(bottomLeft, textureBottomLeft), + new Vertex(bottomRight, textureBottomRight), texture); texturedPolygon2 .setMouseInteractionController(mouseInteractionController); @@ -85,9 +86,9 @@ public class TexturedRectangle extends AbstractCompositeShape { addShape(texturedPolygon2); } - public void initialize(final int width, final int height, - final int maxTextureUpscale) { - initialize(width, height, width, height, maxTextureUpscale); - } +// public void initialize(final int width, final int height, +// final int maxTextureUpscale) { +// initialize(width, height, width, height, maxTextureUpscale); +// } }