Subversion Repositories gelsvn

Rev

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

Rev 178 Rev 198
Line 43... Line 43...
43
		public:
43
		public:
44
 
44
 
45
				/** Constructor. Call with the distance to the center. */
45
				/** Constructor. Call with the distance to the center. */
46
				SimpleTrackBall(const CGLA::Vec3f& _center, float _r): 
46
				SimpleTrackBall(const CGLA::Vec3f& _center, float _r): 
47
						center(_center),
47
						center(_center),
48
						r(_r), theta(M_PI/2.0f), phi(0.0f), 
48
						r(_r), theta(static_cast<float>(M_PI_2)), phi(0.0f), 
49
						da(M_PI/100.0f), dr(r/100.0f), firsttime(true),
49
						da(static_cast<float>(M_PI/100.0)), dr(r/100.0f), firsttime(true),
50
						X(0), Y(1), Z(2)
50
						X(0), Y(1), Z(2)
51
						{} 
51
						{} 
52
 
52
 
53
				/** Call this to set up OpenGL viewing matrix. It will also 
53
				/** Callthis to set up OpenGL viewing matrix. It will also 
54
						clear the view matrix. */
54
						clear the view matrix. */
55
				void gl_view() const;
55
				void gl_view() const;
56
 
56
 
57
				void get_view(CGLA::Vec3f& c, CGLA::Vec3f& e, CGLA::Vec3f& u)
57
				void get_view(CGLA::Vec3f& c, CGLA::Vec3f& e, CGLA::Vec3f& u)
58
						{
58
						{