This is my FPS camera class for my application in computer graphics lecture. Oh yeah, i’m using Java and OpenGL (jOGL)
Camera object is used to store coordinate information and direction of viewing. Object camera has three normal vectors as a constituent component of direction-vector, up-vector, and right-vector. This third vector perpendicular to each other.
In order for viewing camera seemed to move around, over or away from terrain object is using rotation and translation of three vectors cameras mentioned above.
There are six process of camera rotation and translation as follows: