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