00001 #ifndef IGUANA_GL_BROWSERS_IG_3DAXISROTATION_CONTROL_H 00002 # define IGUANA_GL_BROWSERS_IG_3DAXISROTATION_CONTROL_H 00003 00004 //<<<<<< INCLUDES >>>>>> 00005 # include "Iguana/GLBrowsers/interface/IgControlBase.h" 00006 # include "Iguana/GLBrowsers/interface/Ig3DPlaneControl.h" 00007 # include "Iguana/GLBrowsers/interface/IgQtAxisAlignment.h" 00008 # include "Iguana/Studio/interface/IgSoQtThumbWheel.h" 00009 00010 //<<<<<< PUBLIC DEFINES >>>>>> 00011 class Ig3DPlaneControl; 00012 class SbVec3f; 00013 //class IgSoQtThumbWheel; 00014 00015 //<<<<<< PUBLIC CONSTANTS >>>>>> 00016 static const int X_Axis = 0; 00017 static const int Y_Axis = 1; 00018 static const int Z_Axis = 2; 00019 00020 //<<<<<< PUBLIC TYPES >>>>>> 00021 //<<<<<< PUBLIC VARIABLES >>>>>> 00022 //<<<<<< PUBLIC FUNCTIONS >>>>>> 00023 //<<<<<< CLASS DECLARATIONS >>>>>> 00024 00025 class IGUANA_GL_BROWSERS_API Ig3DAxisRotationControl : public IgControlBase 00026 { 00027 Q_OBJECT 00028 public: 00029 Ig3DAxisRotationControl (IgControlCategory *pane, QString label, Ig3DPlaneControl* planeControl); 00030 // implicit copy constructor 00031 // implicit assignment operator 00032 // implicit destructor 00033 00034 IgSoQtThumbWheel* xWidget () const; 00035 IgSoQtThumbWheel* yWidget () const; 00036 IgSoQtThumbWheel* zWidget () const; 00037 00038 protected: 00039 virtual void applyValue (void); 00040 virtual void updateValue (void); 00041 00042 private slots: 00043 void setXAxisDirty (float change); 00044 void setYAxisDirty (float change); 00045 void setZAxisDirty (float change); 00046 void alignToAxis (); 00047 00048 private: 00049 void makeWheelControl (IgControlCategory* pane, QWidget* parent, int axis, bool horizontal); 00050 SbVec3f rotateAboutAxis (float x, float y, float z, float angle); 00051 00052 Ig3DPlaneControl* m_planeControl; 00053 float m_oldAngle[3]; 00054 IgQtAxisAlignment* m_alignment; 00055 IgSoQtThumbWheel* m_thumbWheels[3]; 00056 }; 00057 00058 //<<<<<< INLINE PUBLIC FUNCTIONS >>>>>> 00059 //<<<<<< INLINE MEMBER FUNCTIONS >>>>>> 00060 00061 #endif // IGUANA_GL_BROWSERS_IG_3DAXISROTATION_CONTROL_H