Conversion of osg::notify to OSG_INFO.
This commit is contained in:
@@ -33,7 +33,7 @@ AnimationPathManipulator::AnimationPathManipulator( const std::string& filename
|
||||
|
||||
if (!in)
|
||||
{
|
||||
osg::notify(osg::WARN) << "AnimationPathManipulator: Cannot open animation path file \"" << filename << "\".\n";
|
||||
OSG_WARN << "AnimationPathManipulator: Cannot open animation path file \"" << filename << "\".\n";
|
||||
_valid = false;
|
||||
return;
|
||||
}
|
||||
@@ -100,7 +100,7 @@ bool AnimationPathManipulator::handle(const osgGA::GUIEventAdapter& ea,osgGA::GU
|
||||
|
||||
_timeScale *= 1.1;
|
||||
|
||||
osg::notify(osg::NOTICE)<<"Animation speed = "<<_timeScale*100<<"%"<<std::endl;
|
||||
OSG_NOTICE<<"Animation speed = "<<_timeScale*100<<"%"<<std::endl;
|
||||
|
||||
// adjust timeOffset so the current animationTime does change.
|
||||
_timeOffset = animationTime/_timeScale - time;
|
||||
@@ -114,7 +114,7 @@ bool AnimationPathManipulator::handle(const osgGA::GUIEventAdapter& ea,osgGA::GU
|
||||
|
||||
_timeScale /= 1.1;
|
||||
|
||||
osg::notify(osg::NOTICE)<<"Animation speed = "<<_timeScale*100<<"%"<<std::endl;
|
||||
OSG_NOTICE<<"Animation speed = "<<_timeScale*100<<"%"<<std::endl;
|
||||
|
||||
// adjust timeOffset so the current animationTime does change.
|
||||
_timeOffset = animationTime/_timeScale - time;
|
||||
@@ -178,8 +178,8 @@ void AnimationPathManipulator::handleFrame( double time )
|
||||
double delta = time-_realStartOfTimedPeriod;
|
||||
|
||||
double frameRate = (double)_numOfFramesSinceStartOfTimedPeriod/delta;
|
||||
osg::notify(osg::NOTICE) <<"AnimatonPath completed in "<<delta<<" seconds, completing "<<_numOfFramesSinceStartOfTimedPeriod<<" frames,"<<std::endl;
|
||||
osg::notify(osg::NOTICE) <<" average frame rate = "<<frameRate<<std::endl;
|
||||
OSG_NOTICE <<"AnimatonPath completed in "<<delta<<" seconds, completing "<<_numOfFramesSinceStartOfTimedPeriod<<" frames,"<<std::endl;
|
||||
OSG_NOTICE <<" average frame rate = "<<frameRate<<std::endl;
|
||||
|
||||
// reset counters for next loop.
|
||||
_realStartOfTimedPeriod = time;
|
||||
|
||||
@@ -83,7 +83,7 @@ osg::Matrixd CameraViewSwitchManipulator::getMatrix() const
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"CameraViewSwitchManipulator::getMatrix(): Unable to calculate matrix due to empty parental path."<<std::endl;
|
||||
OSG_NOTICE<<"CameraViewSwitchManipulator::getMatrix(): Unable to calculate matrix due to empty parental path."<<std::endl;
|
||||
}
|
||||
}
|
||||
return mat;
|
||||
@@ -103,7 +103,7 @@ osg::Matrixd CameraViewSwitchManipulator::getInverseMatrix() const
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"CameraViewSwitchManipulator::getInverseMatrix(): Unable to calculate matrix due to empty parental path."<<std::endl;
|
||||
OSG_NOTICE<<"CameraViewSwitchManipulator::getInverseMatrix(): Unable to calculate matrix due to empty parental path."<<std::endl;
|
||||
}
|
||||
}
|
||||
return mat;
|
||||
|
||||
@@ -38,7 +38,7 @@ static double getHeightOfDriver()
|
||||
{
|
||||
height = osg::asciiToDouble(getenv("OSG_DRIVE_MANIPULATOR_HEIGHT"));
|
||||
}
|
||||
OSG_NOTIFY(osg::INFO)<<"DriveManipulator::_height set to =="<<height<<std::endl;
|
||||
OSG_INFO<<"DriveManipulator::_height set to =="<<height<<std::endl;
|
||||
return height;
|
||||
}
|
||||
|
||||
@@ -449,7 +449,7 @@ bool DriveManipulator::calcMovement()
|
||||
|
||||
if (dt<0.0f)
|
||||
{
|
||||
notify(INFO) << "warning dt = "<<dt<< std::endl;
|
||||
OSG_INFO << "warning dt = "<<dt<< std::endl;
|
||||
dt = 0.0;
|
||||
}
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ bool FlightManipulator::performMovement()
|
||||
|
||||
if (eventTimeDelta<0.0f)
|
||||
{
|
||||
notify(WARN) << "Manipulator warning: eventTimeDelta = " << eventTimeDelta << std::endl;
|
||||
OSG_WARN << "Manipulator warning: eventTimeDelta = " << eventTimeDelta << std::endl;
|
||||
eventTimeDelta = 0.0f;
|
||||
}
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ bool KeySwitchMatrixManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapt
|
||||
KeyManipMap::iterator it=_manips.find(ea.getKey());
|
||||
if(it != _manips.end())
|
||||
{
|
||||
osg::notify(osg::INFO)<<"Switching to manipulator: "<<(*it).second.first<<std::endl;
|
||||
OSG_INFO<<"Switching to manipulator: "<<(*it).second.first<<std::endl;
|
||||
if ( !it->second.second->getNode() )
|
||||
{
|
||||
it->second.second->setNode(_current->getNode());
|
||||
@@ -185,8 +185,6 @@ bool KeySwitchMatrixManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapt
|
||||
it->second.second->init(ea,aa);
|
||||
_current = it->second.second;
|
||||
|
||||
//_cameraManipChangeCallbacks.notify(this);
|
||||
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ bool NodeTrackerManipulator::validateNodePath() const
|
||||
{
|
||||
if (*itr==0)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"Warning: tracked node path has been invalidated by changes in the scene graph."<<std::endl;
|
||||
OSG_NOTICE<<"Warning: tracked node path has been invalidated by changes in the scene graph."<<std::endl;
|
||||
const_cast<ObserverNodePath&>(_trackNodePath).clear();
|
||||
return false;
|
||||
}
|
||||
@@ -102,7 +102,7 @@ void NodeTrackerManipulator::setNode(Node* node)
|
||||
if (_node.valid())
|
||||
{
|
||||
setMinimumDistance(clampBetween(_modelSize*0.001, 0.00001, 1.0));
|
||||
notify(INFO) << "NodeTrackerManipulator: setting minimum distance to "
|
||||
OSG_INFO << "NodeTrackerManipulator: setting minimum distance to "
|
||||
<< _minimumDistance << std::endl;
|
||||
}
|
||||
}
|
||||
@@ -112,7 +112,7 @@ void NodeTrackerManipulator::setTrackNode(osg::Node* node)
|
||||
{
|
||||
if (!node)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"NodeTrackerManipulator::setTrackNode(Node*): Unable to set tracked node due to null Node*"<<std::endl;
|
||||
OSG_NOTICE<<"NodeTrackerManipulator::setTrackNode(Node*): Unable to set tracked node due to null Node*"<<std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -121,22 +121,22 @@ void NodeTrackerManipulator::setTrackNode(osg::Node* node)
|
||||
{
|
||||
if (nodePaths.size()>1)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"osgGA::NodeTrackerManipualtor::setTrackNode(..) taking first parent path, ignoring others."<<std::endl;
|
||||
OSG_NOTICE<<"osgGA::NodeTrackerManipualtor::setTrackNode(..) taking first parent path, ignoring others."<<std::endl;
|
||||
}
|
||||
|
||||
osg::notify(osg::INFO)<<"NodeTrackerManipulator::setTrackNode(Node*"<<node<<" "<<node->getName()<<"): Path set"<<std::endl;
|
||||
OSG_INFO<<"NodeTrackerManipulator::setTrackNode(Node*"<<node<<" "<<node->getName()<<"): Path set"<<std::endl;
|
||||
_trackNodePath.clear();
|
||||
setTrackNodePath( nodePaths.front() );
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"NodeTrackerManipulator::setTrackNode(Node*): Unable to set tracked node due to empty parental path."<<std::endl;
|
||||
OSG_NOTICE<<"NodeTrackerManipulator::setTrackNode(Node*): Unable to set tracked node due to empty parental path."<<std::endl;
|
||||
}
|
||||
|
||||
osg::notify(osg::INFO)<<"setTrackNode("<<node->getName()<<")"<<std::endl;
|
||||
OSG_INFO<<"setTrackNode("<<node->getName()<<")"<<std::endl;
|
||||
for(unsigned int i=0; i<_trackNodePath.size(); ++i)
|
||||
{
|
||||
osg::notify(osg::INFO)<<" "<<_trackNodePath[i]->className()<<" '"<<_trackNodePath[i]->getName()<<"'"<<std::endl;
|
||||
OSG_INFO<<" "<<_trackNodePath[i]->className()<<" '"<<_trackNodePath[i]->getName()<<"'"<<std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -392,7 +392,7 @@ bool SphericalManipulator::calcMovement()
|
||||
}
|
||||
else
|
||||
{
|
||||
notify(osg::DEBUG_INFO) << "Pushing forward"<<std::endl;
|
||||
OSG_DEBUG << "Pushing forward"<<std::endl;
|
||||
// push the camera forward.
|
||||
scale = -fd;
|
||||
|
||||
|
||||
@@ -433,7 +433,7 @@ bool StandardManipulator::performMovement()
|
||||
double eventTimeDelta = _ga_t0->getTime() - _ga_t1->getTime();
|
||||
if( eventTimeDelta < 0. )
|
||||
{
|
||||
notify( WARN ) << "Manipulator warning: eventTimeDelta = " << eventTimeDelta << std::endl;
|
||||
OSG_WARN << "Manipulator warning: eventTimeDelta = " << eventTimeDelta << std::endl;
|
||||
eventTimeDelta = 0.;
|
||||
}
|
||||
|
||||
@@ -741,7 +741,7 @@ void StandardManipulator::fixVerticalAxis( const osg::Vec3d& forward, const osg:
|
||||
else {
|
||||
|
||||
// return original up
|
||||
notify( WARN ) << "StandardManipulator::fixVerticalAxis warning: Can not update vertical axis." << std::endl;
|
||||
OSG_WARN << "StandardManipulator::fixVerticalAxis warning: Can not update vertical axis." << std::endl;
|
||||
newUp = up;
|
||||
|
||||
}
|
||||
|
||||
@@ -57,8 +57,8 @@ void TerrainManipulator::setNode( Node* node )
|
||||
if( _node.valid() )
|
||||
{
|
||||
setMinimumDistance( clampBetween( _modelSize * 0.001, 0.00001, 1.0 ) );
|
||||
notify( INFO ) << "TerrainManipulator: setting _minimumDistance to "
|
||||
<< _minimumDistance << std::endl;
|
||||
OSG_INFO << "TerrainManipulator: setting _minimumDistance to "
|
||||
<< _minimumDistance << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,8 +70,8 @@ void TerrainManipulator::setByMatrix(const Matrixd& matrix)
|
||||
Vec3d lookVector(- matrix(2,0),-matrix(2,1),-matrix(2,2));
|
||||
Vec3d eye(matrix(3,0),matrix(3,1),matrix(3,2));
|
||||
|
||||
notify(INFO)<<"eye point "<<eye<<std::endl;
|
||||
notify(INFO)<<"lookVector "<<lookVector<<std::endl;
|
||||
OSG_INFO<<"eye point "<<eye<<std::endl;
|
||||
OSG_INFO<<"lookVector "<<lookVector<<std::endl;
|
||||
|
||||
if (!_node)
|
||||
{
|
||||
@@ -92,7 +92,7 @@ void TerrainManipulator::setByMatrix(const Matrixd& matrix)
|
||||
bool hitFound = false;
|
||||
if (intersect(start_segment, end_segment, ip))
|
||||
{
|
||||
notify(INFO) << "Hit terrain ok A"<< std::endl;
|
||||
OSG_INFO << "Hit terrain ok A"<< std::endl;
|
||||
_center = ip;
|
||||
|
||||
_distance = (eye-ip).length();
|
||||
@@ -141,7 +141,7 @@ void TerrainManipulator::setTransformation( const osg::Vec3d& center, const osg:
|
||||
_distance = lv.length();
|
||||
_center = center;
|
||||
|
||||
notify(INFO) << "In compute"<< std::endl;
|
||||
OSG_INFO << "In compute"<< std::endl;
|
||||
|
||||
if (_node.valid())
|
||||
{
|
||||
@@ -269,7 +269,7 @@ bool TerrainManipulator::performMovementMiddleMouseButton( const double eventTim
|
||||
if (!hitFound)
|
||||
{
|
||||
// ??
|
||||
notify(INFO)<<"TerrainManipulator unable to intersect with terrain."<<std::endl;
|
||||
OSG_INFO<<"TerrainManipulator unable to intersect with terrain."<<std::endl;
|
||||
}
|
||||
|
||||
coordinateFrame = getCoordinateFrame(_center);
|
||||
@@ -283,13 +283,13 @@ bool TerrainManipulator::performMovementMiddleMouseButton( const double eventTim
|
||||
{
|
||||
_rotation = _rotation * pan_rotation;
|
||||
_previousUp = new_localUp;
|
||||
//notify(NOTICE)<<"Rotating from "<<localUp<<" to "<<new_localUp<<" angle = "<<acos(localUp*new_localUp/(localUp.length()*new_localUp.length()))<<std::endl;
|
||||
//OSG_NOTICE<<"Rotating from "<<localUp<<" to "<<new_localUp<<" angle = "<<acos(localUp*new_localUp/(localUp.length()*new_localUp.length()))<<std::endl;
|
||||
|
||||
//clampOrientation();
|
||||
}
|
||||
else
|
||||
{
|
||||
notify(INFO)<<"New up orientation nearly inline - no need to rotate"<<std::endl;
|
||||
OSG_INFO<<"New up orientation nearly inline - no need to rotate"<<std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,7 +323,7 @@ void TerrainManipulator::clampOrientation()
|
||||
|
||||
if (sideVector.length()<0.1)
|
||||
{
|
||||
notify(INFO)<<"Side vector short "<<sideVector.length()<<std::endl;
|
||||
OSG_INFO<<"Side vector short "<<sideVector.length()<<std::endl;
|
||||
|
||||
sideVector = upVector^localUp;
|
||||
sideVector.normalize();
|
||||
|
||||
@@ -175,7 +175,7 @@ void UFOManipulator::computeHomePosition()
|
||||
}
|
||||
else
|
||||
{
|
||||
//osg::notify(osg::WARN)<<"UFOManipulator : I can't find the ground!"<<std::endl;
|
||||
//OSG_WARN<<"UFOManipulator : I can't find the ground!"<<std::endl;
|
||||
ground = 0.0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user