Added prerequisites for future Camera Tilt feature

This commit is contained in:
CrushedPixel
2015-05-05 10:52:06 +02:00
parent a0c204d29d
commit 36eab58705
7 changed files with 56 additions and 4 deletions

View File

@@ -7,6 +7,7 @@ public class Position {
private double x, y, z;
private float pitch, yaw;
private float rotation = 0;
public Position(Entity e) {
this.x = e.posX;
@@ -16,6 +17,15 @@ public class Position {
this.yaw = e.rotationYaw;
}
public Position(double x, double y, double z, float pitch, float yaw, float rotation) {
this.x = x;
this.y = y;
this.z = z;
this.pitch = pitch;
this.yaw = yaw;
this.rotation = rotation;
}
public Position(double x, double y, double z, float pitch, float yaw) {
this.x = x;
this.y = y;
@@ -64,6 +74,10 @@ public class Position {
this.yaw = yaw;
}
public float getRotation() { return rotation; }
public void setRotation(float rotation) { this.rotation = rotation; }
@Override
public String toString() {
return "X=" + x + ", Y=" + y + ", Z=" + z + ", Yaw=" + yaw + ", Pitch=" + pitch;
@@ -85,6 +99,7 @@ public class Position {
.append(z)
.append(pitch)
.append(yaw)
.append(rotation)
.toHashCode();
}
}