Subversion Repositories gelsvn

Rev

Rev 207 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 207 Rev 294
Line 3... Line 3...
3
 
3
 
4
#include "CGLA/Vec2i.h"
4
#include "CGLA/Vec2i.h"
5
#include "CGLA/Vec2f.h"
5
#include "CGLA/Vec2f.h"
6
#include "CGLA/Vec3f.h"
6
#include "CGLA/Vec3f.h"
7
#include "CGLA/Vec3Hf.h"
7
#include "CGLA/Vec3Hf.h"
8
#include "CGLA/Quaternion.h"
8
#include "CGLA/Quatf.h"
9
 
9
 
10
namespace GLGraphics
10
namespace GLGraphics
11
{
11
{
12
 
12
 
13
	enum TrackBallAction
13
	enum TrackBallAction
Line 27... Line 27...
27
	{
27
	{
28
		CGLA::Vec3f centre;
28
		CGLA::Vec3f centre;
29
		CGLA::Vec2i screen_centre;
29
		CGLA::Vec2i screen_centre;
30
 
30
 
31
		unsigned width, height;
31
		unsigned width, height;
32
		CGLA::Quaternion	qrot;
32
		CGLA::Quatf	qrot;
33
		CGLA::Quaternion	qinc;
33
		CGLA::Quatf	qinc;
34
		CGLA::Vec2f	trans;
34
		CGLA::Vec2f	trans;
35
		CGLA::Vec3f scale;
35
		CGLA::Vec3f scale;
36
		float	ballsize;
36
		float	ballsize;
37
		float eye_dist;
37
		float eye_dist;
38
		CGLA::Vec2f last_pos;
38
		CGLA::Vec2f last_pos;
Line 75... Line 75...
75
		{
75
		{
76
			screen_centre[0] = _screen_centre[0];
76
			screen_centre[0] = _screen_centre[0];
77
			screen_centre[1] = height - _screen_centre[1];
77
			screen_centre[1] = height - _screen_centre[1];
78
		}
78
		}
79
 
79
 
80
		const CGLA::Quaternion& get_rotation() const 
80
		const CGLA::Quatf& get_rotation() const 
81
		{
81
		{
82
			return qrot;
82
			return qrot;
83
		}
83
		}
84
 
84
 
85
		void set_rotation(const CGLA::Quaternion& _qrot)
85
		void set_rotation(const CGLA::Quatf& _qrot)
86
		{
86
		{
87
			qrot = _qrot;
87
			qrot = _qrot;
88
		}
88
		}
89
 
89
 
90
		void set_eye_dist(float _eye_dist)
90
		void set_eye_dist(float _eye_dist)