projects
/
sixth-3d.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactoring to remove unneeded complexity.
[sixth-3d.git]
/
src
/
main
/
java
/
eu
/
svjatoslav
/
sixth
/
e3d
/
math
/
Vertex.java
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
(file)
--- 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;
*/
public Point2D onScreenCoordinate;
+
+ /**
+ * Coordinate within texture.
+ */
+ public Point2D textureCoordinate;
+
+
/**
* The frame number when this vertex was last transformed.
*/
private int lastTransformedFrame;
public Vertex() {
/**
* 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) {
}
public Vertex(final Point3D location) {
+ this(location, null);
+ }
+
+ public Vertex(final Point3D location, Point2D textureCoordinate) {
coordinate = location;
transformedCoordinate = new Point3D();
onScreenCoordinate = new Point2D();
coordinate = location;
transformedCoordinate = new Point3D();
onScreenCoordinate = new Point2D();
+ this.textureCoordinate = textureCoordinate;
}
}