Rev | Line | |
---|
[6] | 1 | |
---|
[66] | 2 | |
---|
| 3 | #ifndef CUSTOMTRACKBALL_H |
---|
| 4 | #define CUSTOMTRACKBALL_H |
---|
| 5 | |
---|
| 6 | |
---|
[6] | 7 | #include <project.h> |
---|
| 8 | #include <osgGA/TrackballManipulator> |
---|
[66] | 9 | #include <osgGA/GUIActionAdapter> |
---|
| 10 | #include <osgGA/GUIEventAdapter> |
---|
[6] | 11 | |
---|
[66] | 12 | |
---|
[6] | 13 | class CustomTrackballManipulator : public osgGA::TrackballManipulator |
---|
| 14 | { |
---|
| 15 | |
---|
| 16 | public: |
---|
[66] | 17 | |
---|
[6] | 18 | void moveToHome(); |
---|
[66] | 19 | virtual bool handle( const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us ); |
---|
| 20 | void disable(){ _disabled = true ;} |
---|
| 21 | void enable(){ _disabled = false ;} |
---|
[70] | 22 | bool isEnabled(){ return !_disabled ;} |
---|
[6] | 23 | |
---|
[66] | 24 | |
---|
[6] | 25 | protected: |
---|
| 26 | |
---|
[66] | 27 | bool _disabled; |
---|
| 28 | |
---|
[6] | 29 | }; |
---|
| 30 | |
---|
[66] | 31 | #endif // CUSTOMTRACKBALL_H |
---|
Note: See
TracBrowser
for help on using the repository browser.