#include <renderer_camera.h>
Public Member Functions | |
| Camera (Vector< double, 3 > const &xx, Vector< double, 3 > const &yy, Vector< double, 3 > const &zz, Vector< double, 3 > const &position, double const zoom=1) | |
| Initializes a Camera matrix, and orthonormalizes the vectors. | |
| Vector< double, 3 > const & | VectorX () const |
| Returns the X vector. | |
| Vector< double, 3 > const & | VectorY () const |
| Returns the Y vector. | |
| Vector< double, 3 > const & | VectorZ () const |
| Returns the Z vector. | |
| Vector< double, 3 > const & | Position () const |
| Returns the position. | |
| double const & | Zoom () const |
| Returns the zoom level. | |
| void | MoveRight (double const distance) |
Move the camera right (in camera coordinates) by the specified distance. | |
| void | MoveUp (double const distance) |
Move the camera up (in camera coordinates) by the specified distance. | |
| void | MoveBackward (double const distance) |
Move the camera backwards (in camera coordinates) by the specified distance. | |
| void | MoveLeft (double const distance) |
Move the camera left (in camera coordinates) by the specified distance. | |
| void | MoveDown (double const distance) |
Move the camera down (in camera coordinates) by the specified distance. | |
| void | MoveForward (double const distance) |
Move the camera forwards (in camera coordinates) by the specified distance. | |
| void | TurnCounterclockwise (double const angle) |
Roll the camera counterclockwise (in camera coordinates) by the specified angle (measured in radians). | |
| void | TurnDown (double const angle) |
Yaw the camera down (in camera coordinates) by the specified angle (measured in radians). | |
| void | TurnLeft (double const angle) |
Pitch the camera left (in camera coordinates) by the specified angle (measured in radians). | |
| void | TurnClockwise (double const angle) |
Roll the camera clockwise (in camera coordinates) by the specified angle (measured in radians). | |
| void | TurnUp (double const angle) |
Yaw the camera up (in camera coordinates) by the specified angle (measured in radians). | |
| void | TurnRight (double const angle) |
Pitch the camera right (in camera coordinates) by the specified angle (measured in radians). | |
| void | ZoomOut (double const amount) |
Zooms in by the specified amount. | |
| void | ZoomIn (double const amount) |
Zooms in by the specified amount. | |
| void | ZoomTo (double const zoom=1) |
| Sets the zoom level. | |
| void | Normalize () |
| Orthonormalize the X, Y and Z vectors. | |
Camera class.
Represents a camera matrix, consisting of a position, three vectors, and a zoom level. Following convention, the Z vector points backwards (i.e. towards the observer, from the scene), the Y vector points up (i.e. towards the top of the screen), and the X vector points right (i.e. the right side of the screen). Pictorially:
|Y | P----X / /Z
Where the observer (at position P) is looking along the direction opposite Z, with Y and X defining the orientation of the viewing frustum. The 3x4 camera matrix is simply [X,Y,Z,P].
Definition at line 52 of file renderer_camera.h.
1.8.1.2