Subversion Repositories gelsvn

Rev

Rev 638 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 638 Rev 647
Line 30... Line 30...
30
      spin(false),
30
    spin(false),
31
      ball(CGLA::Vec3f(0.0,0.0,0.0), 0.0, 500, 500)
31
    ball(CGLA::Vec3f(0.0,0.0,0.0), 0.0, 500, 500)
32
  {
32
    {
33
    znear = 0.01f*0.0;
33
        znear = 0.01f*0.0;
34
    zfar  = 3*0.0;
34
        zfar  = 3*0.0;
35
    reset_projection();
35
        //    reset_projection();
36
  }
36
    }
37
 
37
    
38
 
38
    
39
  GLViewController::GLViewController(int _WINX, int _WINY, const CGLA::Vec3f& centre, float rad)
39
    GLViewController::GLViewController(int _WINX, int _WINY, const CGLA::Vec3f& centre, float rad)
40
    : FOV_DEG(53),
40
    : FOV_DEG(53),
Line 44... Line 44...
44
      spin(false),
44
    spin(false),
45
      ball(centre, rad, WINX, WINY)
45
    ball(centre, rad, WINX, WINY)
46
  {
46
    {
47
    znear = 0.01f*rad;
47
        znear = 0.01f*rad;
48
    zfar  = 3*rad;
48
        zfar  = 3*rad;
49
    reset_projection();
49
        // reset_projection();
50
  }
50
    }
51
 
51
    
52
  void GLViewController::grab_ball(TrackBallAction action, const CGLA::Vec2i& pos)
52
    void GLViewController::grab_ball(TrackBallAction action, const CGLA::Vec2i& pos)
53
  {
53
    {
54
    ball.grab_ball(action,pos);
54
        ball.grab_ball(action,pos);
Line 94... Line 94...
94
    return false;
94
        return false;
95
  }
95
    }
96
  
96
    
97
  void GLViewController::set_gl_modelview()
97
    void GLViewController::set_gl_modelview()
98
  {
98
    {
-
 
99
        reset_projection();
99
    ball.set_gl_modelview();
100
        ball.set_gl_modelview();
100
  }
101
    }
101
 
102
    
102
 
103
    
103
  void GLViewController::reshape(int W, int H)
104
    void GLViewController::reshape(int W, int H)