Changeset 3969

Show
Ignore:
Timestamp:
04/04/05 20:07:27
Author:
don
Message:

Removed annoying "Can't find the ground" message

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • OpenSceneGraph/trunk/src/osgGA/UFOManipulator.cpp

    r3950 r3969  
    7171    _inverseMatrix = mat; 
    7272    _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(); 
    7380} 
    7481 
     
    7784    _matrix = invmat; 
    7885    _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(); 
    7993} 
    8094 
    8195osg::Matrixd UFOManipulator::getMatrix() const 
    8296{ 
    83         return (_offset * _matrix); 
     97    return (_offset * _matrix); 
    8498} 
    8599 
     
    137151    else 
    138152    { 
    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; 
    140154        ground = 0.0; 
    141155    } 
     
    146160} 
    147161 
    148 void UFOManipulator::init(const GUIEventAdapter& ea, GUIActionAdapter&) 
    149 
    150     home(ea.time()); 
     162void UFOManipulator::init(const GUIEventAdapter&, GUIActionAdapter&) 
     163
     164    //home(ea.time()); 
     165 
     166puts( "INIT" ) ; 
     167 
     168    _stop(); 
    151169} 
    152170