#ifndef ROOT_TGLRotateManip
#define ROOT_TGLRotateManip
#ifndef ROOT_TGLManip
#include "TGLManip.h"
#endif
class TGLRotateManip : public TGLManip
{
private:
Bool_t fShallowRing;
Bool_t fShallowFront;
TGLPlane fActiveRingPlane;
TGLVertex3 fActiveRingCenter;
TGLLine3 fRingLine;
TGLLine3 fRingLineOld;
void DrawAxisRing(const TGLVertex3& origin, const TGLVector3& axis,
Double_t radius, Float_t rgba[4]) const;
Double_t CalculateAngleDelta(const TPoint& mouse, const TGLCamera& camera);
TGLLine3 CalculateRingLine(const TPoint& mouse, const TGLCamera& camera) const;
protected:
static Double_t Angle(const TGLVector3& v1, const TGLVector3& v2);
static Double_t Angle(const TGLVector3& v1, const TGLVector3& v2, const TGLVector3& ref);
public:
TGLRotateManip();
TGLRotateManip(TGLPhysicalShape* shape);
virtual ~TGLRotateManip();
virtual void Draw(const TGLCamera& camera) const;
virtual Bool_t HandleButton(const Event_t& event, const TGLCamera& camera);
virtual Bool_t HandleMotion(const Event_t& event, const TGLCamera& camera);
ClassDef(TGLRotateManip, 0);
};
#endif