Assignments Assignments

camera.h
Go to the documentation of this file.
1#ifndef CAMERA_INCLUDED
2#define CAMERA_INCLUDED
3#include <stdio.h>
4#include <Util/geometry.h>
5
6 namespace Ray
7{
9 class Camera
10 {
11 public:
13 double heightAngle;
14
16 Util::Point3D position;
17
19 Util::Point3D forward;
20
22 Util::Point3D up;
23
25 Util::Point3D right;
26
28 void drawOpenGL( void ) const;
29
31 void rotateUp( Util::Point3D center , float angle );
32
34 void rotateRight( Util::Point3D center , float angle );
35
37 void moveForward( float dist );
38
40 void moveRight( float dist );
41
43 void moveUp( float dist );
44
46 Util::Ray3D getRay( int i , int j , int width , int height ) const;
47 };
48
50 std::ostream &operator << ( std::ostream &stream , const Camera &camera );
51
53 std::istream &operator >> ( std::istream &stream , Camera &camera );
54}
55#endif // CAMERA_INCLUDED
56
57
Ray::Camera
Definition camera.h:10
Ray::Camera::forward
Util::Point3D forward
Definition camera.h:19
Ray::Camera::position
Util::Point3D position
Definition camera.h:16
Ray::Camera::getRay
Util::Ray3D getRay(int i, int j, int width, int height) const
Definition camera.todo.cpp:13
Ray::Camera::up
Util::Point3D up
Definition camera.h:22
Ray::Camera::right
Util::Point3D right
Definition camera.h:25
Ray::Camera::moveRight
void moveRight(float dist)
Definition camera.todo.cpp:57
Ray::Camera::moveForward
void moveForward(float dist)
Definition camera.todo.cpp:49
Ray::Camera::rotateRight
void rotateRight(Util::Point3D center, float angle)
Definition camera.todo.cpp:41
Ray::Camera::heightAngle
double heightAngle
Definition camera.h:13
Ray::Camera::rotateUp
void rotateUp(Util::Point3D center, float angle)
Definition camera.todo.cpp:33
Ray::Camera::moveUp
void moveUp(float dist)
Definition camera.todo.cpp:65
Ray::Camera::drawOpenGL
void drawOpenGL(void) const
Definition camera.todo.cpp:22
Util::Point< 3 >
Util::Ray
Definition geometry.h:299
geometry.h
Ray
Definition box.h:7
Ray::operator>>
std::istream & operator>>(std::istream &stream, Camera &camera)
Definition camera.cpp:15
Ray::operator<<
std::ostream & operator<<(std::ostream &stream, const Camera &camera)
Definition camera.cpp:25