@@ -0,0 +1,1620 @@
+package eco.game;%0A%0Aimport org.lwjgl.opengl.GL11;%0Aimport org.lwjgl.util.vector.Vector3f;%0A%0A/**%0A * A class that represents a camera for use with the openGl projection matrix.%0A * Has methods for movement in six directions, along with a method look() that%0A * will apply the matrix transformations that make the camera function. Defaults%0A * to a 30 degree pitch and 0 degree yaw%0A * %0A * @author phil%0A * %0A */%0A%0Apublic class Camera %7B%0A%0A%09private Vector3f position;%0A%09private float yaw = 0.0f;%0A%09private float pitch = 30.0f;%0A%0A%09public Camera(float x, float y, float z) %7B%0A%09%09position = new Vector3f(x, y, z);%0A%09%7D%0A%0A%09public void moveForward(float distance) %7B%0A%09%09position.x += distance * (float) Math.sin(Math.toRadians(yaw));%0A%09%09position.z -= distance * (float) Math.cos(Math.toRadians(yaw));%0A%09%7D%0A%0A%09public void moveBack(float distance) %7B%0A%09%09position.x -= distance * (float) Math.sin(Math.toRadians(yaw));%0A%09%09position.z += distance * (float) Math.cos(Math.toRadians(yaw));%0A%09%7D%0A%0A%09public void moveLeft(float distance) %7B%0A%09%09position.x -= distance * (float) Math.sin(Math.toRadians(yaw - 90));%0A%09%09position.z += distance * (float) Math.cos(Math.toRadians(yaw - 90));%0A%09%7D%0A%0A%09public void moveRight(float distance) %7B%0A%09%09position.x -= distance * (float) Math.sin(Math.toRadians(yaw + 90));%0A%09%09position.z += distance * (float) Math.cos(Math.toRadians(yaw + 90));%0A%09%7D%0A%0A%09public void moveUp(float distance) %7B%0A%09%09position.y -= distance;%0A%09%7D%0A%0A%09public void moveDown(float distance) %7B%0A%09%09position.y += distance;%0A%09%7D%0A%0A%09public void look() %7B%0A%09%09GL11.glRotatef(yaw, 0f, 0f, 1f);%0A%09%09GL11.glRotatef(pitch, 1f, 0f, 0f);%0A%09%09GL11.glTranslatef(-position.x, position.y, -position.z);%0A%09%7D%0A%0A%7D%0A

Create Camera.java