00001 00010 #ifndef DEFAULTMOUSENAV_H 00011 #define DEFAULTMOUSENAV_H 00012 00013 #include "IS3DCommon.H" 00014 #include "AnimObj.H" 00015 #include "Fsa.H" 00016 #include "FsaMgr.H" 00017 #include "DrawObj.H" 00018 00019 namespace IS3D { 00020 00076 class DefaultMouseNav : public AnimObj 00077 { 00078 public: 00079 00080 DefaultMouseNav(); 00081 virtual ~DefaultMouseNav(); 00082 00083 void startEnter(EventRef e); 00084 void initialClick(EventRef e); 00085 void checkMovementForPanOrDolly(EventRef e); 00086 void panMove(EventRef e); 00087 void dollyMove(EventRef e); 00088 void rotOn(EventRef e); 00089 void rotMove(EventRef e); 00090 void spinDecision(EventRef e); 00091 void spinningEnter(EventRef e); 00092 void spinOff(EventRef e); 00093 00094 void scaleUp(EventRef e); 00095 void scaleDown(EventRef e); 00096 00097 void animate(); 00098 00099 protected: 00100 00101 FsaRef _fsa; 00102 Vector2 _ptrOffset; 00103 Vector2 _lastPos; 00104 Vector2 _initialClickPos; 00105 double _initialClickTime; 00106 bool _hitGeometry; 00107 Vector3 _hitPoint; 00108 DrawObjRef _hitPointIcon; 00109 Vector3 _lastIntersectionPt; 00110 Sphere _boundingSphere; 00111 double _lastRotTime; 00112 double _rotAngularVel; 00113 Vector3 _rotAxis; 00114 }; 00115 00116 } 00117 #endif