Refactoring to remove unneeded complexity.
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / math / Vertex.java
index 50423b1..24c243f 100644 (file)
@@ -34,21 +34,31 @@ public class Vertex {
      */
     public Point2D onScreenCoordinate;
 
+
+    /**
+     * Coordinate within texture.
+     */
+    public Point2D textureCoordinate;
+
+
     /**
      * The frame number when this vertex was last transformed.
      */
     private int lastTransformedFrame;
 
     public Vertex() {
-        coordinate = new Point3D();
-        transformedCoordinate = new Point3D();
-        onScreenCoordinate = new Point2D();
+        this(new Point3D());
     }
 
     public Vertex(final Point3D location) {
+        this(location, null);
+    }
+
+    public Vertex(final Point3D location, Point2D textureCoordinate) {
         coordinate = location;
         transformedCoordinate = new Point3D();
         onScreenCoordinate = new Point2D();
+        this.textureCoordinate = textureCoordinate;
     }