00001 00009 #ifndef _ARCBALL_H_ 00010 #define _ARCBALL_H_ 00011 00012 #include "../geometry/Point.h" 00013 #include "../geometry/Point2.h" 00014 #include "../geometry/quat.h" 00015 00016 namespace MeshLib 00017 { 00028 class CArcball 00029 { 00030 public: 00034 CArcball(){}; 00035 00043 CArcball( int width, int height, int ox, int oy ); 00050 CQrot update( int nx, int ny ); 00051 00052 00053 private: 00059 void _plane2sphere( const CPoint2 & v, CPoint & r ); 00063 CPoint m_position; 00067 double m_radius; 00071 CPoint2 m_center; 00072 }; 00073 00074 } 00075 #endif