Changeset 3969
- Timestamp:
- 04/04/05 20:07:27
- Files:
-
- OpenSceneGraph/trunk/src/osgGA/UFOManipulator.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
OpenSceneGraph/trunk/src/osgGA/UFOManipulator.cpp
r3950 r3969 71 71 _inverseMatrix = mat; 72 72 _matrix.invert( _inverseMatrix ); 73 74 _position.set( _inverseMatrix(3,0), _inverseMatrix(3,1), _inverseMatrix(3,2 )); 75 osg::Matrix R(_inverseMatrix); 76 R(3,0) = R(3,1) = R(3,2) = 0.0; 77 _direction = osg::Vec3(0,0,-1) * R; // yep. 78 79 _stop(); 73 80 } 74 81 … … 77 84 _matrix = invmat; 78 85 _inverseMatrix.invert( _matrix ); 86 87 _position.set( _inverseMatrix(3,0), _inverseMatrix(3,1), _inverseMatrix(3,2 )); 88 osg::Matrix R(_inverseMatrix); 89 R(3,0) = R(3,1) = R(3,2) = 0.0; 90 _direction = osg::Vec3(0,0,-1) * R; // yep. 91 92 _stop(); 79 93 } 80 94 81 95 osg::Matrixd UFOManipulator::getMatrix() const 82 96 { 83 return (_offset * _matrix);97 return (_offset * _matrix); 84 98 } 85 99 … … 137 151 else 138 152 { 139 osg::notify(osg::INFO)<<"UFOManipulator : I can't find the ground!"<<std::endl;153 //osg::notify(osg::WARN)<<"UFOManipulator : I can't find the ground!"<<std::endl; 140 154 ground = 0.0; 141 155 } … … 146 160 } 147 161 148 void UFOManipulator::init(const GUIEventAdapter& ea, GUIActionAdapter&) 149 { 150 home(ea.time()); 162 void UFOManipulator::init(const GUIEventAdapter&, GUIActionAdapter&) 163 { 164 //home(ea.time()); 165 166 puts( "INIT" ) ; 167 168 _stop(); 151 169 } 152 170
