|
Assignments
Assignments
|
#include <camera.h>
Public Member Functions | |
| void | drawOpenGL (void) const |
| void | rotateUp (Util::Point3D center, float angle) |
| void | rotateRight (Util::Point3D center, float angle) |
| void | moveForward (float dist) |
| void | moveRight (float dist) |
| void | moveUp (float dist) |
| Util::Ray3D | getRay (int i, int j, int width, int height) const |
Public Attributes | |
| double | heightAngle |
| Util::Point3D | position |
| Util::Point3D | forward |
| Util::Point3D | up |
| Util::Point3D | right |
This class stores information about the camera.
| void Camera::drawOpenGL | ( | void | ) | const |
This method calls the OpenGL commands for setting up the camera.
| Ray3D Camera::getRay | ( | int | i, |
| int | j, | ||
| int | width, | ||
| int | height ) const |
This function returns the ray that leaves the camera and goes through pixel (i,j) of the view plane
| void Camera::moveForward | ( | float | dist | ) |
This call moves the camera in the forward direction by the specified distance.
| void Camera::moveRight | ( | float | dist | ) |
This call moves the camera in the right direction by the specified distance.
| void Camera::moveUp | ( | float | dist | ) |
This call moves the camera in the up direction by the specified distance.
| void Camera::rotateRight | ( | Util::Point3D | center, |
| float | angle ) |
This call rotates the camera, about the axis which is parallel to the right direction of the camera, and passes through the specified point.
| void Camera::rotateUp | ( | Util::Point3D | center, |
| float | angle ) |
This call rotates the camera, about the axis which is parallel to the up direction of the camera, and passes through the specified point.
| Util::Point3D Ray::Camera::forward |
The direction that the camera is looking
| double Ray::Camera::heightAngle |
The field of view of the camera (in radians)
| Util::Point3D Ray::Camera::position |
The position of the camera in world coordinates
| Util::Point3D Ray::Camera::right |
The right direction of the camera
| Util::Point3D Ray::Camera::up |
The up direction of the camera