#include #include #include "camera.h" #include "shape.h" using namespace Ray; using namespace Util; //////////// // Camera // //////////// Ray3D Camera::getRay( int i , int j , int width , int height ) const { ///////////////////////////////////////////////// // Get the ray through the (i,j)-th pixel here // ///////////////////////////////////////////////// THROW( "method undefined" ); return Ray3D(); } void Camera::drawOpenGL( void ) const { glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); gluLookAt( position[0] , position[1] , position[2] , position[0]+forward[0] , position[1]+forward[1] , position[2]+forward[2] , up[0] , up[1] , up[2] ); // Sanity check to make sure that OpenGL state is good ASSERT_OPEN_GL_STATE(); } void Camera::rotateUp( Point3D center , double angle ) { /////////////////////////////////////////////////// // Rotate the camera about the up direction here // /////////////////////////////////////////////////// THROW( "method undefined" ); } void Camera::rotateRight( Point3D center , double angle ) { ////////////////////////////////////////////////////// // Rotate the camera about the right direction here // ////////////////////////////////////////////////////// THROW( "method undefined" ); } void Camera::moveForward( double dist ) { ////////////////////////////////// // Move the camera forward here // ////////////////////////////////// THROW( "method undefined" ); } void Camera::moveRight( double dist ) { /////////////////////////////////////// // Move the camera to the right here // /////////////////////////////////////// THROW( "method undefined" ); } void Camera::moveUp( double dist ) { ///////////////////////////// // Move the camera up here // ///////////////////////////// THROW( "method undefined" ); }