From d1874456701c03fa6d0495426ddc54b7ecbae553 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 28 May 2010 16:08:15 +0000 Subject: [PATCH] Converted osg::notify to OSG_INFO etc. --- src/osgPresentation/AnimationMaterial.cpp | 2 +- src/osgPresentation/PickEventHandler.cpp | 22 ++--- src/osgPresentation/SlideEventHandler.cpp | 88 ++++++++++---------- src/osgPresentation/SlideShowConstructor.cpp | 70 ++++++++-------- 4 files changed, 91 insertions(+), 91 deletions(-) diff --git a/src/osgPresentation/AnimationMaterial.cpp b/src/osgPresentation/AnimationMaterial.cpp index f62f573f5..4680f0544 100644 --- a/src/osgPresentation/AnimationMaterial.cpp +++ b/src/osgPresentation/AnimationMaterial.cpp @@ -169,7 +169,7 @@ void AnimationMaterialCallback::operator()(osg::Node* node, osg::NodeVisitor* nv // Only update _firstTime the first time, when its value is still DBL_MAX if (_firstTime==DBL_MAX) { - osg::notify(osg::INFO)<<"AnimationMaterialCallback::operator() resetting _firstTime to "<className()<className()<dispatchEvent(_keyPos); break; } case(osgPresentation::JUMP): { - osg::notify(osg::NOTICE)<<"Requires jump "<selectSlide(newSlide, newLayer); } @@ -211,7 +211,7 @@ void PickEventHandler::doOperation() } else { - osg::notify(osg::NOTICE)<<"No jump required."<rewind() + play"<rewind() + play"<pause()"<pause()"<pause(); } virtual void setPause(bool pause) { - osg::notify(osg::INFO)<<"_imageStream->setPause("<setPause("<pause(); else _imageStream->play(); @@ -141,17 +141,17 @@ struct CallbackOperator : public ObjectOperator AnimationMaterialCallback* amc = dynamic_cast(_callback.get()); if (apc) { - osg::notify(osg::INFO)<<"apc->setPause("<setPause("<setPause(pause); } if (tc) { - osg::notify(osg::INFO)<<"tc->setPause("<setPause("<setPause(pause); } if (amc) { - osg::notify(osg::INFO)<<"amc->setPause("<setPause("<setPause(pause); } } @@ -197,7 +197,7 @@ struct LayerAttributesOperator : public ObjectOperator if (!_layerAttribute->_keys.empty()) { - osg::notify(osg::INFO)<<"applyKeys {"<_keys.begin(); itr != _layerAttribute->_keys.end(); @@ -206,7 +206,7 @@ struct LayerAttributesOperator : public ObjectOperator SlideEventHandler::instance()->dispatchEvent(*itr); } - osg::notify(osg::INFO)<<"}"<_runStrings.empty()) { @@ -215,12 +215,12 @@ struct LayerAttributesOperator : public ObjectOperator ++itr) { - osg::notify(osg::NOTICE)<<"Run "<c_str()<c_str()<tick(); int result = system(itr->c_str()); - osg::notify(osg::INFO)<<"system("<<*itr<<") result "<delta_s(startTick, osg::Timer::instance()->tick()); @@ -241,7 +241,7 @@ struct LayerAttributesOperator : public ObjectOperator virtual void leave() { - osg::notify(osg::INFO)<<"LayerAttribute leave"<callLeaveCallbacks(_node.get()); } @@ -331,9 +331,9 @@ void ActiveOperators::collect(osg::Node* incommingNode, osg::NodeVisitor::Traver FindOperatorsVisitor fov(_current, tm); incommingNode->accept(fov); - osg::notify(osg::INFO)<<"ActiveOperators::collect("<filePathList); } @@ -520,7 +520,7 @@ public: if (lightsource.getLight()) { - osg::notify(osg::INFO)<<"Adjusting light"<(stateset.getAttribute(osg::StateAttribute::ALPHAFUNC)); if (alphaFunc) { - osg::notify(osg::INFO)<<"Adjusting alpha func"<getReferenceValue(); alpha = osg::clampBetween((1.0f-_currentY)*0.5f,0.0f,1.0f); @@ -621,7 +621,7 @@ public: osg::Material* material = dynamic_cast(stateset.getAttribute(osg::StateAttribute::MATERIAL)); if (material) { - osg::notify(osg::INFO)<<"Adjusting material func"<setAlpha(osg::Material::FRONT_AND_BACK,alpha); } @@ -690,13 +690,13 @@ void SlideEventHandler::set(osg::Node* model) if (findPresentation._switch) { - osg::notify(osg::INFO)<<"Presentation '"<getName()<<"'"<getName()<<"'"<=0.0) { - osg::notify(osg::INFO)<<"Presentation time set to "<getName()<getName()<(&aa); selectSlide(0); home(); - osg::notify(osg::NOTICE)<<"Assigned viewer. to SlideEventHandler"<getNumChildren()>0) { @@ -1043,7 +1043,7 @@ bool SlideEventHandler::selectSlide(int slideNum,int layerNum) _tickAtLastSlideOrLayerChange = tick; } - osg::notify(osg::INFO)<<"selectSlide("<delta_s(_tickAtFirstSlideOrLayerChange, tick)<<" seconds, length ="<delta_s(_tickAtLastSlideOrLayerChange, tick)<<" seconds"<delta_s(_tickAtFirstSlideOrLayerChange, tick)<<" seconds, length ="<delta_s(_tickAtLastSlideOrLayerChange, tick)<<" seconds"<setSingleChildOn(_activeSlide); - //osg::notify(osg::INFO)<<"Selected slide '"<<_presentationSwitch->getChild(_activeSlide)->getName()<<"'"<getChild(_activeSlide)->getName()<<"'"<getName()<<"'"<getName()<<"'"<getChild(_activeLayer)->getName()<<"' num="<<_activeLayer<< std::endl; + OSG_INFO<<"Selected layer '"<<_slideSwitch->getChild(_activeLayer)->getName()<<"' num="<<_activeLayer<< std::endl; return true; } @@ -1245,7 +1245,7 @@ bool SlideEventHandler::home(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAd if (fhpv._homePosition.valid()) { - osg::notify(osg::INFO)<<"Doing home for stored home position."<getCameraManipulator()->setAutoComputeHomePosition(false); _viewer->getCameraManipulator()->setHomePosition( @@ -1274,7 +1274,7 @@ bool SlideEventHandler::home() void SlideEventHandler::updateAlpha(bool modAlphaFunc, bool modMaterial, float x, float y) { - osg::notify(osg::INFO)<<"updateAlpha("<accept(uav); @@ -1284,7 +1284,7 @@ void SlideEventHandler::updateAlpha(bool modAlphaFunc, bool modMaterial, float x void SlideEventHandler::updateLight(float x, float y) { - osg::notify(osg::INFO)<<"updateLight("<getCamera()->getViewMatrix(),x,y); _viewer->getSceneData()->accept(uav); @@ -1323,7 +1323,7 @@ void SlideEventHandler::releaseSlide(unsigned int slideNum) void SlideEventHandler::dispatchEvent(const KeyPosition& keyPosition) { - osg::notify(osg::INFO)<<" keyPosition._key "<getEventQueue(); diff --git a/src/osgPresentation/SlideShowConstructor.cpp b/src/osgPresentation/SlideShowConstructor.cpp index b8f5df7fc..71a1601d8 100644 --- a/src/osgPresentation/SlideShowConstructor.cpp +++ b/src/osgPresentation/SlideShowConstructor.cpp @@ -142,8 +142,8 @@ void SlideShowConstructor::setPresentationAspectRatio(const std::string& str) if (ratio!=0.0) setPresentationAspectRatio(1280.0f/1024.0f); else { - osg::notify(osg::WARN)<<"Error: presentation aspect ratio incorrect type"<=0.0) { @@ -200,7 +200,7 @@ LayerAttributes* SlideShowConstructor::getOrCreateLayerAttributes(osg::Node* nod { if (node->getUserData()) { - osg::notify(osg::NOTICE)<<"UserData already assigned, overriding to set LayerAttributes."<getNumChildren()>0) { - osg::notify(osg::INFO)<<"creating new group within layer"<addChild(group); _currentLayer = group; @@ -461,7 +461,7 @@ void SlideShowConstructor::layerClickToDoOperation(Operation operation, bool rel } else { - osg::notify(osg::INFO)<<"creating secondary group within layer"<addChild(group); _currentLayer = group; @@ -482,7 +482,7 @@ void SlideShowConstructor::layerClickToDoOperation(const std::string& command, O { if (_currentLayer->getNumChildren()>0) { - osg::notify(osg::INFO)<<"creating new group within layer"<addChild(group); _currentLayer = group; @@ -490,7 +490,7 @@ void SlideShowConstructor::layerClickToDoOperation(const std::string& command, O } else { - osg::notify(osg::INFO)<<"creating secondary group within layer"<addChild(group); _currentLayer = group; @@ -511,7 +511,7 @@ void SlideShowConstructor::layerClickEventOperation(const KeyPosition& keyPos, b { if (_currentLayer->getNumChildren()>0) { - osg::notify(osg::INFO)<<"creating new group within layer"<addChild(group); _currentLayer = group; @@ -519,7 +519,7 @@ void SlideShowConstructor::layerClickEventOperation(const KeyPosition& keyPos, b } else { - osg::notify(osg::INFO)<<"creating secondary group within layer"<addChild(group); _currentLayer = group; @@ -764,7 +764,7 @@ osg::Geometry* SlideShowConstructor::createTexturedQuadGeometry(const osg::Vec3& { imageStream->pause(); - osg::notify(osg::INFO)<<"Reading video "<getFileName()<getFileName()<setClientStorageHint(true); @@ -867,7 +867,7 @@ void SlideShowConstructor::addImage(const std::string& filename, const PositionD osg::AnimationPathCallback* animation = getAnimationPathCallback(positionData); if (animation) { - osg::notify(osg::INFO)<<"Have animation path for image"<getPageNum()!=_pageNum) { @@ -1167,7 +1167,7 @@ osg::Image* SlideShowConstructor::addInteractiveImage(const std::string& filenam osg::Image* image = osgDB::readImageFile(filename, _options.get()); - osg::notify(osg::INFO)<<"addInteractiveImage("<addEnterCallback(new SetPageCallback(pdfImage, imageData.page)); - osg::notify(osg::INFO)<<"Setting pdf page num "<setBackgroundColor(imageData.backgroundColor); pdfImage->page(imageData.page); @@ -1289,7 +1289,7 @@ std::string SlideShowConstructor::findFileAndRecordPath(const std::string& filen std::string foundFile = osgDB::findDataFile(filename, _options.get()); if (foundFile.empty()) return foundFile; - osg::notify(osg::INFO)<<"foundFile "<filePathList.begin(),_filePathData->filePathList.end(),path); if (itr==_filePathData->filePathList.end()) { - osg::notify(osg::INFO)<<"New path to record "<filePathList.push_front(path); } } @@ -1308,7 +1308,7 @@ std::string SlideShowConstructor::findFileAndRecordPath(const std::string& filen void SlideShowConstructor::addModel(const std::string& filename, const PositionData& positionData, const ModelData& modelData) { - osg::notify(osg::INFO)<<"SlideShowConstructor::addModel("<setDataVariance(defaultMatrixDataVariance); transform->setMatrix(osg::Matrix::inverse(matrix)); - osg::notify(osg::INFO)<<"Position Matrix "<getMatrix()<getMatrix()<addChild(subgraph); @@ -1414,7 +1414,7 @@ void SlideShowConstructor::addModel(osg::Node* subgraph, const PositionData& pos animation_transform->addChild(subgraph); - osg::notify(osg::INFO)<<"Rotation Matrix "<getMatrix()<getMatrix()<getAnimationPath(); if (positionData.animation_name=="wheel" && (path->getTimeControlPointMap()).size()>=2) { - osg::notify(osg::INFO)<<"**** Need to handle special wheel animation"<getTimeControlPointMap(); @@ -1475,7 +1475,7 @@ void SlideShowConstructor::addModel(osg::Node* subgraph, const PositionData& pos // direction - rotation about the z axis. rotation_z_axis = atan2f(delta_position.y(),delta_position.x()); - osg::notify(osg::INFO)<<" rotation_y_axis="<getTransform()<getTransform()<setTimeMultiplier(positionData.path_time_multiplier); apc->setUseInverseMatrix(positionData.inverse_path); - osg::notify(osg::INFO)<<"UseInverseMatrix "<filePathList.begin(),_filePathData->filePathList.end(),path); if (itr==_filePathData->filePathList.end()) { - osg::notify(osg::INFO)<<"SlideShowConstructor::recordOptionsFilePath(..) - new path to record path="<