X-Git-Url: http://www2.svjatoslav.eu/gitweb/?p=sixth-3d.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Fmath%2FVertex.java;fp=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Fmath%2FVertex.java;h=24c243fb46b83caa7800b787dae66ce6202bc8af;hp=50423b136aa0d18e6329105f0b6b84bab2c06d2d;hb=59980888bd6bba94f84e4f63ce67e5b624df8aea;hpb=9f20345e99404017a98d3ae95b7588cabb31a9bf diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/math/Vertex.java b/src/main/java/eu/svjatoslav/sixth/e3d/math/Vertex.java index 50423b1..24c243f 100644 --- a/src/main/java/eu/svjatoslav/sixth/e3d/math/Vertex.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/math/Vertex.java @@ -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; }