#include <Camera.h>
Collaboration diagram for Camera:
Public Methods | |
| Camera () | |
| virtual | ~Camera () |
| void | positionCamera (double position[], double view[], double upVector[]) |
| void | positionCamera (Vector3 position, Vector3 view, Vector3 upVector) |
| void | checkForMovement () |
| void | rotateView (double angle, double x, double y, double z) |
| void | setViewFromMouse () |
| void | moveCamera (double speed) |
| void | strafeCamera (double speed) |
| void | walk (double speed) |
| void | update () |
| void | increaseSpeed () |
| void | decreaseSpeed () |
| Vector3 | getPosition () |
| double | getPositionX () |
| void | setPositionX (double t) |
| double | getPositionY () |
| double | getPositionZ () |
| Vector3 | getView () |
| double | getViewX () |
| double | getViewY () |
| double | getViewZ () |
| Vector3 | getUpVector () |
| double | getUpVectorX () |
| double | getUpVectorY () |
| double | getUpVectorZ () |
| Vector3 | getStrafe () |
| void | setPositionY (double y) |
| void | setViewY (double y) |
| void | setFocus (Object *o) |
Static Public Methods | |
| void | positionCamera (double p1, double p2, double p3, double v1, double v2, double v3, double u1, double u2, double u3) |
| void | look () |
| void | setScreenSize (int width, int height) |
| double | getCurrentFPS () |
| double | getSpeed () |
Protected Methods | |
| void | init () |
| void | reFocus () |
Protected Attributes | |
| Vector3 | _strafe |
| Vector3 | _walk |
| double | _currentRotationX |
| Object * | _focus |
Static Protected Attributes | |
| Vector3 | _position |
| Vector3 | _view |
| Vector3 | _upVector |
| double | _speed = 0.0 |
| double | _fps = 0.0 |
| int | _screenWidth = 800 |
| int | _screenHeight = 600 |
|
|
|
|
|
|
|
|
Check for movement based on the keyboard input |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Initialize our variables |
|
|
Call glLookAt |
|
|
moves the camera forward and backward |
|
||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
Changes the position, view, and upVector of the camera |
|
|
Follow our focus character |
|
||||||||||||||||||||
|
rotate the view around a position |
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
move the camera based on the mouse |
|
|
|
|
|
strafes the camera left and right |
|
|
Update the camera's data |
|
|
walks the camera forward and backward |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.2.18