Fixed git clone URL
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / renderer / raster / shapes / composite / TexturedRectangle.java
index cd4e641..e5e3e18 100644 (file)
@@ -1,15 +1,13 @@
 /*
- * 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.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;
@@ -65,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);
@@ -83,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);
+//    }
 
 }