Subversion Repositories gelsvn

Rev

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

Rev 178 Rev 344
Line 23... Line 23...
23
		aspect(WINX/WINY),
23
		aspect(WINX/WINY),
24
		centre(_centre), rad(_rad),
24
		centre(_centre), rad(_rad),
25
		button_down(false),
25
		button_down(false),
26
		spin(false)
26
		spin(false)
27
	{
27
	{
28
		float view_dist = rad/sin(FOV_RAD/2.0f);
28
		float view_dist = rad;
29
		ball = new QuatTrackBall(centre, view_dist, WINX, WINY);
29
		ball = new QuatTrackBall(centre, view_dist, WINX, WINY);
30
		znear = view_dist - rad;
30
		znear = 0.01f*rad;
31
		zfar  = view_dist + rad;
31
		zfar  = view_dist + 2 * rad;
32
 
32
 
33
		reset_projection();
33
		reset_projection();
34
	}
34
	}
35
 
35
 
36
	void GLViewController::grab_ball(TrackBallAction action, 
36
	void GLViewController::grab_ball(TrackBallAction action,