Subversion Repositories gelsvn

Rev

Rev 309 | Rev 322 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 309 Rev 310
Line 6... Line 6...
6
#include "CGLA/Vec2f.h"
6
#include "CGLA/Vec2f.h"
7
#include "CGLA/Vec3f.h"
7
#include "CGLA/Vec3f.h"
8
 
8
 
9
#include "Geometry/Ray.h"
9
#include "Geometry/Ray.h"
10
 
10
 
-
 
11
const float NEAR_PLANE = 1.0e-2;
11
const float FAR_PLANE = 1.0e8;
12
const float FAR_PLANE = 1.0e8;
12
 
13
 
13
class Camera
14
class Camera
14
{
15
{
15
public:
16
public:
Line 96... Line 97...
96
  {
97
  {
97
    GLdouble aspect = width/height;    
98
    GLdouble aspect = width/height;    
98
 
99
 
99
    glMatrixMode(GL_PROJECTION);
100
    glMatrixMode(GL_PROJECTION);
100
    glLoadIdentity();
101
    glLoadIdentity();
101
    gluPerspective(fov, aspect, focal_dist, FAR_PLANE);
102
    gluPerspective(fov, aspect, focal_dist*NEAR_PLANE, FAR_PLANE);
102
 
103
 
103
    glMatrixMode(GL_MODELVIEW);
104
    glMatrixMode(GL_MODELVIEW);
104
  }
105
  }
105
 
106
 
106
  void glSetCamera() const
107
  void glSetCamera() const