diff --git a/src/osgUtil/CullVisitor.cpp b/src/osgUtil/CullVisitor.cpp index a45ca1cc8..d02bcfcb0 100644 --- a/src/osgUtil/CullVisitor.cpp +++ b/src/osgUtil/CullVisitor.cpp @@ -169,17 +169,17 @@ void CullVisitor::computeNearPlane() ++itr) { ++numTests; - // OSG_NOTIFY(osg::WARN)<<"testing computeNearestPointInFrustum with d_near = "<first<tick(); - // OSG_NOTIFY(osg::NOTICE)<<"Took "<delta_m(start_t,end_t)<<"ms to test "<delta_m(start_t,end_t)<<"ms to test "<=_computed_znear) { - //OSG_NOTIFY(osg::INFO)<<"clamping "<< "znear="<<_computed_znear << " zfar="<<_computed_zfar<= _znear && n3 >= _znear) { - //OSG_NOTIFY(osg::NOTICE)<<"Triangle totally beyond znear"<=0.0)?1:0) + ((d2>=0.0)?1:0) + ((d3>=0.0)?1:0); @@ -375,7 +375,7 @@ struct ComputeNearestPointFunctor active_mask = active_mask | selector_mask; } - //OSG_NOTIFY(osg::NOTICE)<<"Triangle ok w.r.t plane "< cnpf; cnpf.set(_computed_znear, matrix, &planes); @@ -488,8 +488,8 @@ bool CullVisitor::updateCalculatedNearFar(const osg::Matrix& matrix,const osg::B std::swap(d_near,d_far); if ( !EQUAL_F(d_near, d_far) ) { - OSG_NOTIFY(osg::WARN)<<"Warning: CullVisitor::updateCalculatedNearFar(.) near>far in range calculation,"<< std::endl; - OSG_NOTIFY(osg::WARN)<<" correcting by swapping values d_near="<far in range calculation,"<< std::endl; + OSG_WARN<<" correcting by swapping values d_near="<nd_far) nd_far = d; - OSG_NOTIFY(osg::NOTICE)<<"\ti="<far in range calculation,"<< std::endl; - OSG_NOTIFY(osg::WARN)<<" correcting by swapping values d_near="<far in range calculation,"<< std::endl; + OSG_WARN<<" correcting by swapping values d_near="<=0.0) _computed_znear = d_far; - else OSG_NOTIFY(osg::WARN)<<" 1) sett near with dnear="<getName() << "\"" << std::endl; + OSG_DEBUG << " \"" << (*i)->getName() << "\"" << std::endl; } } else @@ -839,7 +839,7 @@ void CullVisitor::apply(Billboard& node) { if (d<_computed_znear) { - if (d<0.0) OSG_NOTIFY(osg::WARN)<<"Alerting billboard handling ="<getName() << "\"" << std::endl; + OSG_DEBUG << " \"" << (*i)->getName() << "\"" << std::endl; } } else @@ -1025,7 +1025,7 @@ void CullVisitor::apply(Projection& node) ref_ptr matrix = createOrReuseMatrix(node.getMatrix()); pushProjectionMatrix(matrix.get()); - //OSG_NOTIFY(osg::INFO)<<"Push projection "<<*matrix< vind for (std::vector::iterator itint=vindexlist.begin(); itint!=vindexlist.end(); itint++) { - // osg::notify(osg::WARN)<< "add point " << (*itint) << " at " << (*points)[*itint].x() << ","<< (*points)[*itint].y() <push_back((*points)[*itint]); } @@ -475,7 +475,7 @@ Triangle_list fillHole(osg::Vec3Array *points, std::vector vind { unsigned int ic; osg::PrimitiveSet* prset=gtess->getPrimitiveSet(ipr); - // osg::notify(osg::WARN)<< "gtess set " << ipr << " nprims " << prset->getNumPrimitives() << + // OSG_WARN<< "gtess set " << ipr << " nprims " << prset->getNumPrimitives() << // " type " << prset->getMode() << std::endl; unsigned int pidx,pidx1,pidx2; switch (prset->getMode()) { @@ -515,7 +515,7 @@ Triangle_list fillHole(osg::Vec3Array *points, std::vector vind pidx2=vindexlist[prset->index(ic+2)]; } triangles.push_back(Triangle(pidx, pidx1, pidx2, points)); - // osg::notify(osg::WARN)<< "vert " << prset->index(ic) << " in array"<index(ic) << " in array"< vind { triangles.push_back(Triangle(pidx1, pidx, pidx2, points)); } - // osg::notify(osg::WARN)<< "vert " << prset->index(ic) << " in array"<index(ic) << " in array"< vind { pidx=vindexlist[prset->index(0)]; } - // osg::notify(osg::WARN)<< "tfan has " << prset->getNumIndices() << " indices"<getNumIndices() << " indices"<getNumIndices()-1; ic++) { if (prset->index(ic)>=npts) @@ -605,7 +605,7 @@ Triangle_list fillHole(osg::Vec3Array *points, std::vector vind } break; default: - osg::notify(osg::WARN)<< "WARNING set " << ipr << " nprims " << prset->getNumPrimitives() << + OSG_WARN<< "WARNING set " << ipr << " nprims " << prset->getNumPrimitives() << " type " << prset->getMode() << " Type not triangle, tfan or strip"<< std::endl; break; } @@ -661,7 +661,7 @@ void DelaunayConstraint::removeVerticesInside(const DelaunayConstraint *dco) removeIndices( *static_cast(prset), idx ); break; default: - osg::notify(osg::WARN) << "Invalid prset " <getType() << " types PrimitiveType,DrawArraysPrimitiveType=1 etc" << std::endl; + OSG_WARN << "Invalid prset " <getType() << " types PrimitiveType,DrawArraysPrimitiveType=1 etc" << std::endl; break; } } @@ -775,7 +775,7 @@ bool DelaunayTriangulator::triangulate() // check validity of input array if (!points_.valid()) { - osg::notify(osg::WARN) << "Warning: DelaunayTriangulator::triangulate(): invalid sample point array" << std::endl; + OSG_WARN << "Warning: DelaunayTriangulator::triangulate(): invalid sample point array" << std::endl; return false; } @@ -783,7 +783,7 @@ bool DelaunayTriangulator::triangulate() if (points->size() < 1) { - osg::notify(osg::WARN) << "Warning: DelaunayTriangulator::triangulate(): too few sample points" << std::endl; + OSG_WARN << "Warning: DelaunayTriangulator::triangulate(): too few sample points" << std::endl; return false; } @@ -815,16 +815,16 @@ bool DelaunayTriangulator::triangulate() } else { - osg::notify(osg::WARN) << "DelaunayTriangulator: ignore a duplicate point at "<< p1.x()<< " " << p1.y() << std::endl;; + OSG_WARN << "DelaunayTriangulator: ignore a duplicate point at "<< p1.x()<< " " << p1.y() << std::endl;; } } } - // osg::notify(osg::WARN)<< "constraint size "<size()<<" " <size()<<" " <begin(), points->end(), Sample_point_compare); // 24.12.06 add convex hull of points to force sensible outline. osg::ref_ptr dcconvexhull=getconvexhull(points); @@ -841,7 +841,7 @@ bool DelaunayTriangulator::triangulate() float miny = (*points)[0].y(); float maxy = miny; - osg::notify(osg::INFO) << "DelaunayTriangulator: finding minimum and maximum Y values\n"; + OSG_INFO << "DelaunayTriangulator: finding minimum and maximum Y values\n"; osg::Vec3Array::const_iterator mmi; for (mmi=points->begin(); mmi!=points->end(); ++mmi) { @@ -870,7 +870,7 @@ bool DelaunayTriangulator::triangulate() GLuint pidx = 0; osg::Vec3Array::const_iterator i; - osg::notify(osg::INFO) << "DelaunayTriangulator: triangulating vertex grid (" << (points->size()-3) <<" points)\n"; + OSG_INFO << "DelaunayTriangulator: triangulating vertex grid (" << (points->size()-3) <<" points)\n"; for (i=points->begin(); i!=points->end(); ++i, ++pidx) { @@ -941,7 +941,7 @@ bool DelaunayTriangulator::triangulate() // dec 2006 we used to remove supertriangle vertices here, but then we cant strictly use the supertriangle // vertices to find intersections of constraints with terrain, so moved to later. - osg::notify(osg::INFO) << "DelaunayTriangulator: finalizing and cleaning up structures\n"; + OSG_INFO << "DelaunayTriangulator: finalizing and cleaning up structures\n"; // rejoin the two triangle lists triangles.insert(triangles.begin(), discarded_tris.begin(), discarded_tris.end()); @@ -983,7 +983,7 @@ bool DelaunayTriangulator::triangulate() //check that the edge ip1-ip2 is not already part of the triangulation. if (titr->isedge(ip1,ip2)) edgused=true; if (titr->isedge(ip2,ip1)) edgused=true; - // if (edgused) osg::notify(osg::WARN) << "Edge used in triangle " << it << " " << + // if (edgused) OSG_WARN << "Edge used in triangle " << it << " " << // titr->a()<<","<< titr->b()<<","<< titr->c()<< std::endl; it++; } @@ -1003,7 +1003,7 @@ bool DelaunayTriangulator::triangulate() for (titr=triangles.begin(); titr!=triangles.end(); ) { int icut=titr->lineBisects(points_.get(),ip1,p2); - // osg::notify(osg::WARN) << "Testing triangle " << ntr << " "<< ip1 << " ti " << + // OSG_WARN << "Testing triangle " << ntr << " "<< ip1 << " ti " << // titr->a()<< ","<b() <<"," <c() << std::endl; if (icut>0) { @@ -1011,7 +1011,7 @@ bool DelaunayTriangulator::triangulate() std::vector edgeRight, edgeLeft; edgeRight.push_back(ip1); edgeLeft.push_back(ip1); - // osg::notify(osg::WARN) << "hole first " << edgeLeft.back()<< " rt " << edgeRight.back()<< std::endl; + // OSG_WARN << "hole first " << edgeLeft.back()<< " rt " << edgeRight.back()<< std::endl; trisToDelete.push_back(&(*titr)); // now find the unique triangle that shares the defined edge unsigned int e1, e2; // indices of ends of test triangle titr @@ -1030,7 +1030,7 @@ bool DelaunayTriangulator::triangulate() } edgeRight.push_back(e2); edgeLeft.push_back(e1); - // osg::notify(osg::WARN) << icut << "hole edges " << edgeLeft.back()<< " rt " << edgeRight.back()<< std::endl; + // OSG_WARN << icut << "hole edges " << edgeLeft.back()<< " rt " << edgeRight.back()<< std::endl; const Triangle *tradj=getTriangleWithEdge(e2,e1, &triangles); if (tradj) { @@ -1038,7 +1038,7 @@ bool DelaunayTriangulator::triangulate() { trisToDelete.push_back(tradj); icut=tradj->whichEdge(points_.get(),p1,p2,e1,e2); - // osg::notify(osg::WARN) << ntr << " cur triedge " << icut << " " << ip1 << + // OSG_WARN << ntr << " cur triedge " << icut << " " << ip1 << // " to " << ip2 << " tadj " << tradj->a()<< ","<b() <<"," // <c() <b(); e2=tradj->c();} // icut=1 implies vertex a is not involved @@ -1049,7 +1049,7 @@ bool DelaunayTriangulator::triangulate() } else if(edgeRight.back()!=e2 && edgeLeft.back()==e1 && e2!=ip2) { edgeRight.push_back(e2); } else { - if (!tradj->usesVertex(ip2)) osg::notify(osg::WARN) << "tradj error " << tradj->a()<< " , " << tradj->b()<< " , " << tradj->c()<< std::endl; + if (!tradj->usesVertex(ip2)) OSG_WARN << "tradj error " << tradj->a()<< " , " << tradj->b()<< " , " << tradj->c()<< std::endl; } const Triangle *previousTradj = tradj; tradj=getTriangleWithEdge(e2,e1, &triangles); @@ -1058,7 +1058,7 @@ bool DelaunayTriangulator::triangulate() } } if (trisToDelete.size()>=900) { - osg::notify(osg::WARN) << " found " << trisToDelete.size() << " adjacent tris " <getNumPrimitives() << " triangles remain\n"; + OSG_INFO << "DelaunayTriangulator: process done, " << prim_tris_->getNumPrimitives() << " triangles remain\n"; return true; } @@ -1180,7 +1180,7 @@ void DelaunayTriangulator::removeInternalTriangles(DelaunayConstraint *dc ) if( normals_.valid() ) normitr = normals_->begin(); - // osg::notify(osg::WARN) << "DelaunayTriangulator: removeinternals, " << std::endl; + // OSG_WARN << "DelaunayTriangulator: removeinternals, " << std::endl; for (osg::DrawElementsUInt::iterator triit=prim_tris_->begin(); triit!=prim_tris_->end(); ) { // triangle joins points_[itr, itr+1, itr+2] @@ -1188,7 +1188,7 @@ void DelaunayTriangulator::removeInternalTriangles(DelaunayConstraint *dc ) if ( dc->contains(tritest.compute_centroid( points_.get()) ) ) { // centroid is inside the triangle, so IF inside linear, remove - // osg::notify(osg::WARN) << "DelaunayTriangulator: remove, " << (*triit) << "," << *(triit+1) <<","<<*(triit+2)<< std::endl; + // OSG_WARN << "DelaunayTriangulator: remove, " << (*triit) << "," << *(triit+1) <<","<<*(triit+2)<< std::endl; dc->addtriangle((*triit), *(triit+1), *(triit+2)); triit=prim_tris_->erase(triit); triit=prim_tris_->erase(triit); @@ -1211,7 +1211,7 @@ void DelaunayTriangulator::removeInternalTriangles(DelaunayConstraint *dc ) } } - osg::notify(osg::INFO) << "end of test dc, deleted " << ndel << std::endl; + OSG_INFO << "end of test dc, deleted " << ndel << std::endl; } } //=== DelaunayConstraint functions diff --git a/src/osgUtil/EdgeCollector.cpp b/src/osgUtil/EdgeCollector.cpp index a11c9b8a1..33550136e 100644 --- a/src/osgUtil/EdgeCollector.cpp +++ b/src/osgUtil/EdgeCollector.cpp @@ -157,7 +157,7 @@ osg::UIntArray * EdgeCollector::Edgeloop::toIndexArray() const EdgeCollector::Triangle* EdgeCollector::addTriangle(unsigned int p1, unsigned int p2, unsigned int p3) { - //osg::notify(osg::NOTICE)<<"addTriangle("< edge = new Edge; edge->setOrderedPoints(p1,p2); EdgeSet::iterator itr = _edgeSet.find(edge); if (itr==_edgeSet.end()) { - // osg::notify(osg::NOTICE)<<" addEdge("<_p1="<_p1.get()<<" _p2="<_p2.get()<_p1="<_p1.get()<<" _p2="<_p2.get()<_p1="<_p1.get()<<" _p2="<_p2.get()<_p1="<_p1.get()<<" _p2="<_p2.get()<(itr->get()); - //osg::notify(osg::NOTICE)<<" reusePoint("<_triangles.insert(triangle); @@ -288,7 +288,7 @@ bool EdgeCollector::extractBoundaryEdgeloop(EdgeList & el, Edgeloop & edgeloop) if (!found) { - osg::notify(osg::WARN) << "extractBoundaryEdgeloop : unable to close edge loop" << std::endl; + OSG_WARN << "extractBoundaryEdgeloop : unable to close edge loop" << std::endl; return false; } else @@ -452,7 +452,7 @@ void EdgeCollector::setGeometry(osg::Geometry* geometry) if (_geometry->suitableForOptimization()) { // removing coord indices - osg::notify(osg::INFO)<<"EdgeCollector::setGeometry(..): Removing attribute indices"<copyToAndOptimize(*_geometry); } @@ -482,7 +482,7 @@ void EdgeCollector::getEdgeloopIndexList(IndexArrayList & ial) EdgeloopList edgeloopList; if (extractBoundaryEdgeloopList(edgeList, edgeloopList) == false) { - osg::notify(osg::WARN) << "EdgeCollector: fail to collect Edgeloop.\n\n\n" << std::endl; + OSG_WARN << "EdgeCollector: fail to collect Edgeloop.\n\n\n" << std::endl; return; } diff --git a/src/osgUtil/GLObjectsVisitor.cpp b/src/osgUtil/GLObjectsVisitor.cpp index c0bcc661d..66de529ea 100644 --- a/src/osgUtil/GLObjectsVisitor.cpp +++ b/src/osgUtil/GLObjectsVisitor.cpp @@ -182,7 +182,7 @@ void GLObjectsOperation::operator () (osg::GraphicsContext* context) glObjectsVisitor.setState(context->getState()); - // osg::notify(osg::NOTICE)<<"GLObjectsOperation::before <<<<<<<<<<<"<accept(glObjectsVisitor); @@ -196,7 +196,7 @@ void GLObjectsOperation::operator () (osg::GraphicsContext* context) (*itr)->accept(glObjectsVisitor); } } - // osg::notify(osg::NOTICE)<<"GLObjectsOperation::after >>>>>>>>>>> "<>>>>>>>>>> "<buildCompileMap(_contexts); - osg::notify(osg::INFO)<<"IncrementalCompileOperation::add(CompileSet = "< lock(_toCompileMutex); _toCompile.push_back(compileSet); @@ -125,7 +125,7 @@ void IncrementalCompileOperation::add(CompileSet* compileSet, bool callBuildComp void IncrementalCompileOperation::mergeCompiledSubgraphs() { - // osg::notify(osg::INFO)<<"IncrementalCompileOperation::mergeCompiledSubgraphs()"< compilded_lock(_compiledMutex); @@ -286,7 +286,7 @@ void IncrementalCompileOperation::CompileSet::buildCompileMap(ContextSet& contex void IncrementalCompileOperation::operator () (osg::GraphicsContext* context) { - // osg::notify(osg::NOTICE)<<"IncrementalCompileOperation::operator () ("<getTimeSinceLastClear(); - osg::notify(level)<<"currentTime = "<_view_inverse.valid()) eyePoint = eyePoint * (*(cis->_view_inverse)); if (cis->_model_inverse.valid()) eyePoint = eyePoint * (*(cis->_model_inverse)); - //osg::notify(osg::NOTICE)<<"IntersectVisitor::getEyePoint()"<valid()) { - notify(WARN)<<"Warning: invalid line segment passed to IntersectVisitor::addLineSegment(..)"<start()<<" "<end()<<" segment ignored.."<< std::endl; + OSG_WARN<<"Warning: invalid line segment passed to IntersectVisitor::addLineSegment(..)"<start()<<" "<end()<<" segment ignored.."<< std::endl; return; } @@ -272,8 +272,8 @@ void IntersectVisitor::addLineSegment(LineSegment* seg) if (cis->_segList.size()>=32) { - notify(WARN)<<"Warning: excessive number of line segmenets passed to IntersectVisitor::addLineSegment(..), maximum permitted is 32 line segments."<start()<<" "<end()<<" segment ignored.."<< std::endl; + OSG_WARN<<"Warning: excessive number of line segmenets passed to IntersectVisitor::addLineSegment(..), maximum permitted is 32 line segments."<start()<<" "<end()<<" segment ignored.."<< std::endl; return; } @@ -547,9 +547,9 @@ struct TriangleIntersect Vec3 in = v1*r1+v2*r2+v3*r3; if (!in.valid()) { - osg::notify(WARN)<<"Warning:: Picked up error in TriangleIntersect"<intersect(s,e,intersections)) { - // osg::notify(osg::NOTICE)<<"Got KdTree intersections"<accept(stats); stats.totalUpStats(); - osg::notify(osg::NOTICE)<accept(tsv); @@ -173,7 +173,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) if (options & REMOVE_LOADED_PROXY_NODES) { - OSG_NOTIFY(osg::INFO)<<"Optimizer::optimize() doing REMOVE_LOADED_PROXY_NODES"<accept(rlpnv); @@ -183,7 +183,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) if (options & COMBINE_ADJACENT_LODS) { - OSG_NOTIFY(osg::INFO)<<"Optimizer::optimize() doing COMBINE_ADJACENT_LODS"<accept(clv); @@ -192,7 +192,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) if (options & OPTIMIZE_TEXTURE_SETTINGS) { - OSG_NOTIFY(osg::INFO)<<"Optimizer::optimize() doing OPTIMIZE_TEXTURE_SETTINGS"<accept(cssv); @@ -244,13 +244,13 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) if (options & FLATTEN_STATIC_TRANSFORMS) { - OSG_NOTIFY(osg::INFO)<<"Optimizer::optimize() doing FLATTEN_STATIC_TRANSFORMS"<accept(fstv); result = fstv.removeTransforms(node); @@ -265,7 +265,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) if (options & FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS) { - OSG_NOTIFY(osg::INFO)<<"Optimizer::optimize() doing FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS"<tick(); @@ -284,12 +284,12 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) osg::Timer_t endTick = osg::Timer::instance()->tick(); - OSG_NOTIFY(osg::INFO)<<"MERGE_GEODES took "<delta_s(startTick,endTick)<delta_s(startTick,endTick)<accept(mgv); @@ -297,7 +297,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) if (options & MAKE_FAST_GEOMETRY) { - OSG_NOTIFY(osg::INFO)<<"Optimizer::optimize() doing MAKE_FAST_GEOMETRY"<accept(mgv); @@ -305,7 +305,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) if (options & MERGE_GEOMETRY) { - OSG_NOTIFY(osg::INFO)<<"Optimizer::optimize() doing MERGE_GEOMETRY"<tick(); @@ -315,12 +315,12 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) osg::Timer_t endTick = osg::Timer::instance()->tick(); - OSG_NOTIFY(osg::INFO)<<"MERGE_GEOMETRY took "<delta_s(startTick,endTick)<delta_s(startTick,endTick)<accept(tsv); @@ -329,7 +329,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) if (options & REMOVE_REDUNDANT_NODES) { - OSG_NOTIFY(osg::INFO)<<"Optimizer::optimize() doing REMOVE_REDUNDANT_NODES"<accept(renv); @@ -350,7 +350,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) if (options & SPATIALIZE_GROUPS) { - OSG_NOTIFY(osg::INFO)<<"Optimizer::optimize() doing SPATIALIZE_GROUPS"<accept(sv); @@ -359,7 +359,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) if (options & INDEX_MESH) { - OSG_NOTIFY(osg::INFO)<<"Optimizer::optimize() doing INDEX_MESH"<accept(imv); imv.makeMesh(); @@ -367,7 +367,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) if (options & VERTEX_POSTTRANSFORM) { - OSG_NOTIFY(osg::INFO)<<"Optimizer::optimize() doing VERTEX_POSTTRANSFORM"<accept(vcv); vcv.optimizeVertices(); @@ -375,7 +375,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) if (options & VERTEX_PRETRANSFORM) { - OSG_NOTIFY(osg::INFO)<<"Optimizer::optimize() doing VERTEX_PRETRANSFORM"<accept(vaov); vaov.optimizeOrder(); @@ -386,7 +386,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) stats.reset(); node->accept(stats); stats.totalUpStats(); - osg::notify(osg::NOTICE)<className()<< std::endl; + OSG_INFO << " "<<*aaitr << " "<<(*aaitr)->className()<< std::endl; } - OSG_NOTIFY(osg::INFO) << "searching for duplicate attributes"<< std::endl; + OSG_INFO << "searching for duplicate attributes"<< std::endl; // find the duplicates. AttributeList::iterator first_unique = attributeList.begin(); AttributeList::iterator current = first_unique; @@ -590,13 +590,13 @@ void Optimizer::StateVisitor::optimize() { if (**current==**first_unique) { - OSG_NOTIFY(osg::INFO) << " found duplicate "<<(*current)->className()<<" first="<<*first_unique<<" current="<<*current<< std::endl; + OSG_INFO << " found duplicate "<<(*current)->className()<<" first="<<*first_unique<<" current="<<*current<< std::endl; StateSetList& statesetlist = attributeToStateSetMap[*current]; for(StateSetList::iterator sitr=statesetlist.begin(); sitr!=statesetlist.end(); ++sitr) { - OSG_NOTIFY(osg::INFO) << " replace duplicate "<<*current<<" with "<<*first_unique<< std::endl; + OSG_INFO << " replace duplicate "<<*current<<" with "<<*first_unique<< std::endl; osg::StateSet* stateset = sitr->first; unsigned int unit = sitr->second; if (unit==NON_TEXTURE_ATTRIBUTE) stateset->setAttribute(*first_unique); @@ -625,15 +625,15 @@ void Optimizer::StateVisitor::optimize() // other. std::sort(uniformList.begin(),uniformList.end(),LessDerefFunctor()); - OSG_NOTIFY(osg::INFO) << "state uniform list"<< std::endl; + OSG_INFO << "state uniform list"<< std::endl; for(UniformList::iterator uuitr = uniformList.begin(); uuitr!=uniformList.end(); ++uuitr) { - OSG_NOTIFY(osg::INFO) << " "<<*uuitr << " "<<(*uuitr)->getName()<< std::endl; + OSG_INFO << " "<<*uuitr << " "<<(*uuitr)->getName()<< std::endl; } - OSG_NOTIFY(osg::INFO) << "searching for duplicate uniforms"<< std::endl; + OSG_INFO << "searching for duplicate uniforms"<< std::endl; // find the duplicates. UniformList::iterator first_unique_uniform = uniformList.begin(); UniformList::iterator current_uniform = first_unique_uniform; @@ -642,13 +642,13 @@ void Optimizer::StateVisitor::optimize() { if ((**current_uniform)==(**first_unique_uniform)) { - OSG_NOTIFY(osg::INFO) << " found duplicate uniform "<<(*current_uniform)->getName()<<" first_unique_uniform="<<*first_unique_uniform<<" current_uniform="<<*current_uniform<< std::endl; + OSG_INFO << " found duplicate uniform "<<(*current_uniform)->getName()<<" first_unique_uniform="<<*first_unique_uniform<<" current_uniform="<<*current_uniform<< std::endl; StateSetSet& statesetset = uniformToStateSetMap[*current_uniform]; for(StateSetSet::iterator sitr=statesetset.begin(); sitr!=statesetset.end(); ++sitr) { - OSG_NOTIFY(osg::INFO) << " replace duplicate "<<*current_uniform<<" with "<<*first_unique_uniform<< std::endl; + OSG_INFO << " replace duplicate "<<*current_uniform<<" with "<<*first_unique_uniform<< std::endl; osg::StateSet* stateset = *sitr; stateset->addUniform(*first_unique_uniform); } @@ -678,7 +678,7 @@ void Optimizer::StateVisitor::optimize() // other. std::sort(statesetSortList.begin(),statesetSortList.end(),LessDerefFunctor()); - OSG_NOTIFY(osg::INFO) << "searching for duplicate attributes"<< std::endl; + OSG_INFO << "searching for duplicate attributes"<< std::endl; // find the duplicates. StateSetSortList::iterator first_unique = statesetSortList.begin(); StateSetSortList::iterator current = first_unique; ++current; @@ -686,13 +686,13 @@ void Optimizer::StateVisitor::optimize() { if (**current==**first_unique) { - OSG_NOTIFY(osg::INFO) << " found duplicate "<<(*current)->className()<<" first="<<*first_unique<<" current="<<*current<< std::endl; + OSG_INFO << " found duplicate "<<(*current)->className()<<" first="<<*first_unique<<" current="<<*current<< std::endl; ObjectSet& objSet = _statesets[*current]; for(ObjectSet::iterator sitr=objSet.begin(); sitr!=objSet.end(); ++sitr) { - OSG_NOTIFY(osg::INFO) << " replace duplicate "<<*current<<" with "<<*first_unique<< std::endl; + OSG_INFO << " replace duplicate "<<*current<<" with "<<*first_unique<< std::endl; osg::Object* obj = *sitr; osg::Drawable* drawable = dynamic_cast(obj); if (drawable) @@ -1137,9 +1137,9 @@ bool CollectLowestTransformsVisitor::removeTransforms(osg::Node* nodeWeCannotRem } else { - OSG_NOTIFY(osg::WARN)<<"Warning:: during Optimize::CollectLowestTransformsVisitor::removeTransforms(Node*)"<first->className()<first->className()<=2) { - // OSG_NOTIFY(osg::NOTICE)<<"Before "< DuplicateList; typedef std::map GeometryDuplicateMap; @@ -2027,14 +2027,14 @@ bool Optimizer::MergeGeometryVisitor::mergeGeode(osg::Geode& geode) geode.removeDrawable(rhs); static int co = 0; - OSG_NOTIFY(osg::INFO)<<"merged and removed Geometry "<<++co<divide_distance; bool zAxis = (bb.zMax()-bb.zMin())>divide_distance; - OSG_NOTIFY(osg::INFO)<<"Dividing "<className()<<" num children = "<getNumChildren()<<" xAxis="<className()<<" num children = "<getNumChildren()<<" xAxis="<divide_distance; bool zAxis = (bb.zMax()-bb.zMin())>divide_distance; - OSG_NOTIFY(osg::INFO)<<"INFO "<className()<<" num drawables = "<getNumDrawables()<<" xAxis="<className()<<" num drawables = "<getNumDrawables()<<" xAxis="<getParents(); if (parents.empty()) { - OSG_NOTIFY(osg::INFO)<<" Cannot perform spatialize on root Geode, add a Group above it to allow subdivision."<getNumParents()<getNumParents()<getNumParents()-1;i>0;--i) { @@ -3071,7 +3071,7 @@ bool Optimizer::MergeGeodesVisitor::mergeGeodes(osg::Group& group) // if no geodes then just return. if (geodeDuplicateMap.empty()) return false; - OSG_NOTIFY(osg::INFO)<<"mergeGeodes in group '"<_image->getFileName()<<" to see it it'll fit in atlas "<get()<_image->getFileName()<<" to see it it'll fit in atlas "<get()<doesSourceFit(source)) { addedSourceToAtlas = true; @@ -3286,13 +3286,13 @@ void Optimizer::TextureAtlasBuilder::buildAtlas() } else { - OSG_NOTIFY(osg::INFO)<<"source "<_image->getFileName()<<" does not fit in atlas "<get()<_image->getFileName()<<" does not fit in atlas "<get()<_image->getFileName()<_image->getFileName()< atlas = new Atlas(_maximumAtlasWidth,_maximumAtlasHeight,_margin); _atlasList.push_back(atlas.get()); @@ -3611,7 +3611,7 @@ bool Optimizer::TextureAtlasBuilder::Atlas::doesSourceFit(Source* source) if ((_x + sourceImage->s() + 2*_margin) <= _maximumAtlasWidth) { // yes it fits :-) - OSG_NOTIFY(osg::INFO)<<"Fits in current row"<t() + 2*_margin) <= _maximumAtlasHeight) { // yes it fits :-) - OSG_NOTIFY(osg::INFO)<<"Fits in next row"<_image->getFileName()<<" does not fit in atlas "<_image->getFileName()<<" does not fit in atlas "<_image->getFileName()<<" "<<_x<<","<<_y<<" fits in row of atlas "<_image->getFileName()<<" "<<_x<<","<<_y<<" fits in row of atlas "<_x = _x + _margin; @@ -3704,7 +3704,7 @@ bool Optimizer::TextureAtlasBuilder::Atlas::addSource(Source* source) // yes it fits, so add the source to the atlas' list of sources it contains _sourceList.push_back(source); - OSG_NOTIFY(osg::INFO)<<"next row insertion, source "<_image->getFileName()<<" "<<_x<<","<<_y<<" fits in row of atlas "<_image->getFileName()<<" "<<_x<<","<<_y<<" fits in row of atlas "<_x = _x + _margin; @@ -3718,12 +3718,12 @@ bool Optimizer::TextureAtlasBuilder::Atlas::addSource(Source* source) _height = _y + sourceImage->t() + 2*_margin; - OSG_NOTIFY(osg::INFO)<<"source "<_image->getFileName()<<" "<<_x<<","<<_y<<" fits in row of atlas "<_image->getFileName()<<" "<<_x<<","<<_y<<" fits in row of atlas "<_image->getFileName()<<" does not fit in atlas "<_image->getFileName()<<" does not fit in atlas "<allocateImage(_width,_height,1, _image->getPixelFormat(),_image->getDataType(), _image->getPacking()); @@ -3758,7 +3758,7 @@ void Optimizer::TextureAtlasBuilder::Atlas::copySources() for(unsigned int i=0; i_image->getFileName()<<" to "<_x<<" ,"<_y<_image->s()<<","<_image->t()<_image->getFileName()<<" to "<_x<<" ,"<_y<_image->s()<<","<_image->t()<_image.get(); osg::Image* atlasImage = atlas->_image.get(); @@ -4130,7 +4130,7 @@ void Optimizer::TextureAtlasVisitor::optimize() if (texturesThatRepeatAndAreOutOfRange.count(texture)==0) { // safe to convert into CLAMP wrap mode. - OSG_NOTIFY(osg::INFO)<<"Changing wrap mode to CLAMP"<setWrap(osg::Texture2D::WRAP_S, osg::Texture::CLAMP); texture->setWrap(osg::Texture2D::WRAP_T, osg::Texture::CLAMP); } @@ -4239,7 +4239,7 @@ void Optimizer::TextureAtlasVisitor::optimize() { if (s_repeat || t_repeat) { - OSG_NOTIFY(osg::NOTICE)<<"Warning!!! shouldn't get here"<setTextureAttribute(unit, newTexture); @@ -4270,7 +4270,7 @@ void Optimizer::TextureAtlasVisitor::optimize() if (canTexMatBeFlattenedToAllDrawables) { - // OSG_NOTIFY(osg::NOTICE)<<"All drawables can be flattened "<setTextureAttribute(unit, new osg::TexMat(matrix)); } } @@ -4376,7 +4376,7 @@ void Optimizer::FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor::apply( } else { - OSG_NOTIFY(osg::NOTICE) << "No parent for this Group" << std::endl; + OSG_NOTICE << "No parent for this Group" << std::endl; } } else @@ -4417,7 +4417,7 @@ void Optimizer::FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor::apply( } else { - OSG_NOTIFY(osg::NOTICE) << "No parent for this Group" << std::endl; + OSG_NOTICE << "No parent for this Group" << std::endl; } } else @@ -4455,7 +4455,7 @@ void Optimizer::FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor::apply( traverse(*(new_lod.get())); } else - OSG_NOTIFY(osg::NOTICE) << "No parent for this LOD" << std::endl; + OSG_NOTICE << "No parent for this LOD" << std::endl; } else { @@ -4493,7 +4493,7 @@ void Optimizer::FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor::apply( if(parent_group) parent_group->replaceChild(&geode, new_geode.get()); else - OSG_NOTIFY(osg::NOTICE) << "No parent for this Geode" << std::endl; + OSG_NOTICE << "No parent for this Geode" << std::endl; transformGeode(*(new_geode.get())); } @@ -4527,7 +4527,7 @@ void Optimizer::FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor::apply( if(parent_group) parent_group->replaceChild(&billboard, new_billboard.get()); else - OSG_NOTIFY(osg::NOTICE) << "No parent for this Billboard" << std::endl; + OSG_NOTICE << "No parent for this Billboard" << std::endl; transformBillboard(*(new_billboard.get())); } diff --git a/src/osgUtil/PlaneIntersector.cpp b/src/osgUtil/PlaneIntersector.cpp index 9114d7ff5..c9549b037 100644 --- a/src/osgUtil/PlaneIntersector.cpp +++ b/src/osgUtil/PlaneIntersector.cpp @@ -97,13 +97,13 @@ namespace PlaneIntersectorUtils } else { - osg::notify(osg::NOTICE)<<"Error: should not get here!"<_polyline; for(RefPolyline::Polyline::iterator vitr = polyline.begin(); vitr != polyline.end(); ++vitr) { - osg::notify(osg::NOTICE)<<" "<<*vitr<getBound() )!=0 ) return; if ( !_polytope.contains( drawable->getBound() ) ) return; - // osg::notify(osg::NOTICE)<<"Succed PlaneIntersector::intersect(osgUtil::IntersectionVisitor& iv, osg::Drawable* drawable)"< ti; ti.set(_plane, _polytope, iv.getModelMatrix(), _recordHeightsAsAttributes, _em.get()); diff --git a/src/osgUtil/RenderBin.cpp b/src/osgUtil/RenderBin.cpp index 074b092f4..6586afdfd 100644 --- a/src/osgUtil/RenderBin.cpp +++ b/src/osgUtil/RenderBin.cpp @@ -72,7 +72,7 @@ RenderBin* RenderBin::createRenderBin(const std::string& binName) if (prototype) return dynamic_cast(prototype->clone(osg::CopyOp::DEEP_COPY_ALL)); } - osg::notify(osg::WARN) <<"Warning: RenderBin \""<second == proto) { - // osg::notify(osg::NOTICE)<<"Found protype, now erasing "<first<first<erase(itr); return; } } } - // osg::notify(osg::NOTICE)<<"Not found protype"<_parent) : 0); @@ -514,7 +514,7 @@ void RenderBin::drawImplementation(osg::RenderInfo& renderInfo,RenderLeaf*& prev } - // osg::notify(osg::NOTICE)<<"end RenderBin::drawImplementation "<getName()<<" "<<_depth<getName()<<" "<<_depth<second.depth()); } - // OSG_NOTIFY(osg::NOTICE)<<"RenderStage::runCameraSetUp viewport "<<_viewport->x()<<" "<<_viewport->y()<<" "<<_viewport->width()<<" "<<_viewport->height()<x()<<" "<<_viewport->y()<<" "<<_viewport->width()<<" "<<_viewport->height()< lock(*(_camera->getDataChangeMutex())); @@ -521,7 +521,7 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo) if (status != GL_FRAMEBUFFER_COMPLETE_EXT) { - OSG_NOTIFY(osg::NOTICE)<<"RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x"<glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0); @@ -550,7 +550,7 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo) if (status != GL_FRAMEBUFFER_COMPLETE_EXT) { - notify(NOTICE) << "RenderStage::runCameraSetUp(), " + OSG_NOTICE << "RenderStage::runCameraSetUp(), " "multisample FBO setup failed, FBO status = 0x" << std::hex << status << std::dec << std::endl; @@ -613,7 +613,7 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo) traits->width = width; traits->height = height; - // OSG_NOTIFY(osg::NOTICE)<<"traits = "<width<<" "<height<height<pbuffer = (renderTargetImplementation==osg::Camera::PIXEL_BUFFER || renderTargetImplementation==osg::Camera::PIXEL_BUFFER_RTT); traits->windowDecoration = (renderTargetImplementation==osg::Camera::SEPERATE_WINDOW); @@ -695,14 +695,14 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo) { if (renderTargetImplementation==osg::Camera::SEPERATE_WINDOW) { - OSG_NOTIFY(osg::NOTICE)<<"Warning: RenderStage::runCameraSetUp(State&) Window "; + OSG_NOTICE<<"Warning: RenderStage::runCameraSetUp(State&) Window "; } else { - OSG_NOTIFY(osg::NOTICE)<<"Warning: RenderStage::runCameraSetUp(State&) Pbuffer "; + OSG_NOTICE<<"Warning: RenderStage::runCameraSetUp(State&) Pbuffer "; } - OSG_NOTIFY(osg::NOTICE)<<"does not support multiple color outputs."<realize()) { - OSG_NOTIFY(osg::INFO)<<"RenderStage::runCameraSetUp(State&) Context has been realized "<setReadPBuffer(context.get()); } else { - OSG_NOTIFY(osg::INFO)<<"RenderStage::runCameraSetUp(State&) Assigning texture to RenderStage so that it does the copy"<isMultisample()) { - OSG_NOTIFY(osg::WARN) << "Attempting to read from a" + OSG_WARN << "Attempting to read from a" " multisampled framebuffer object. Set a resolve" " framebuffer on the RenderStage to fix this." << std::endl; } @@ -940,7 +940,7 @@ void RenderStage::drawInner(osg::RenderInfo& renderInfo,RenderLeaf*& previous, b GLenum fbstatus = fbo_ext->glCheckFramebufferStatus(GL_FRAMEBUFFER_EXT); if ( fbstatus != GL_FRAMEBUFFER_COMPLETE_EXT ) { - OSG_NOTIFY(osg::NOTICE)<<"RenderStage::drawInner(,) FBO status = 0x"<(object); if (!context) return; - // OSG_NOTIFY(osg::NOTICE)<<"DrawInnerOperation operator"<releaseContext(); - // OSG_NOTIFY(osg::NOTICE)<<" enclosing state before - "<getState(); useContext = _graphicsContext.get(); @@ -1162,7 +1162,7 @@ void RenderStage::draw(osg::RenderInfo& renderInfo,RenderLeaf*& previous) previous = 0; useContext->makeCurrent(); - // OSG_NOTIFY(osg::NOTICE)<<" nested state before - "<getStateSetStackSize()<getStateSetStackSize()<getStateSetStackSize()<getStateSetStackSize()<makeCurrent(); } @@ -1283,7 +1283,7 @@ void RenderStage::drawImplementation(osg::RenderInfo& renderInfo,RenderLeaf*& pr if (!_viewport) { - notify(FATAL) << "Error: cannot draw stage due to undefined viewport."<< std::endl; + OSG_FATAL << "Error: cannot draw stage due to undefined viewport."<< std::endl; return; } @@ -1444,7 +1444,7 @@ void RenderStage::setMultisampleResolveFramebufferObject(osg::FrameBufferObject* { if (fbo && fbo->isMultisample()) { - OSG_NOTIFY(osg::WARN) << "Resolve framebuffer must not be" + OSG_WARN << "Resolve framebuffer must not be" " multisampled." << std::endl; } _resolveFbo = fbo; diff --git a/src/osgUtil/ReversePrimitiveFunctor.cpp b/src/osgUtil/ReversePrimitiveFunctor.cpp index 0526fd209..fdcdc6dd2 100644 --- a/src/osgUtil/ReversePrimitiveFunctor.cpp +++ b/src/osgUtil/ReversePrimitiveFunctor.cpp @@ -183,7 +183,9 @@ void ReversePrimitiveFunctor::drawElements(GLenum mode,GLsizei count,const GLuin void ReversePrimitiveFunctor::begin(GLenum mode) { if (_running) - osg::notify(osg::WARN) << "ReversePrimitiveFunctor : call \"begin\" without call \"end\"." << std::endl; + { + OSG_WARN << "ReversePrimitiveFunctor : call \"begin\" without call \"end\"." << std::endl; + } else { _running = true; @@ -195,7 +197,9 @@ void ReversePrimitiveFunctor::begin(GLenum mode) void ReversePrimitiveFunctor::vertex(unsigned int pos) { if (_running == false) - osg::notify(osg::WARN) << "ReversePrimitiveFunctor : call \"vertex(" << pos << ")\" without call \"begin\"." << std::endl; + { + OSG_WARN << "ReversePrimitiveFunctor : call \"vertex(" << pos << ")\" without call \"begin\"." << std::endl; + } else { static_cast(_reversedPrimitiveSet.get())->push_back(pos); @@ -205,7 +209,9 @@ void ReversePrimitiveFunctor::vertex(unsigned int pos) void ReversePrimitiveFunctor::end() { if (_running == false) - osg::notify(osg::WARN) << "ReversePrimitiveFunctor : call \"end\" without call \"begin\"." << std::endl; + { + OSG_WARN << "ReversePrimitiveFunctor : call \"end\" without call \"begin\"." << std::endl; + } else { _running = false; diff --git a/src/osgUtil/SceneGraphBuilder.cpp b/src/osgUtil/SceneGraphBuilder.cpp index 53274cec2..7c90c6f67 100644 --- a/src/osgUtil/SceneGraphBuilder.cpp +++ b/src/osgUtil/SceneGraphBuilder.cpp @@ -345,7 +345,7 @@ void SceneGraphBuilder::Cylinder(GLfloat aBase, GLint aSlices, GLint aStacks) { - osg::notify(osg::NOTICE)<<"SceneGraphBuilder::Cylinder("<removeOccludedOccluders(); - osg::notify(osg::DEBUG_INFO) << "finished searching for occluder - found "<<_collectOccludersVisitor->getCollectedOccluderSet().size()<getCollectedOccluderSet().size()<getOccluderList().clear(); std::copy(_collectOccludersVisitor->getCollectedOccluderSet().begin(),_collectOccludersVisitor->getCollectedOccluderSet().end(), std::back_insert_iterator(cullVisitor->getOccluderList())); @@ -949,11 +949,11 @@ bool SceneView::cullStage(const osg::Matrixd& projection,const osg::Matrixd& mod { case(HEADLIGHT): if (_light.valid()) renderStage->addPositionedAttribute(NULL,_light.get()); - else osg::notify(osg::WARN)<<"Warning: no osg::Light attached to ogUtil::SceneView to provide head light.*/"<addPositionedAttribute(mv.get(),_light.get()); - else osg::notify(osg::WARN)<<"Warning: no osg::Light attached to ogUtil::SceneView to provide sky light.*/"<draw(_renderInfo,previous); glDisable(GL_STENCIL_TEST); #else - osg::notify(osg::NOTICE)<<"Warning: SceneView::draw() - VERTICAL_INTERLACE, HORIZONTAL_INTERLACE, and CHECKERBOARD stereo not supported."<reportStats(); #endif - // osg::notify(osg::NOTICE)<<"SceneView draw() DynamicObjectCount"<getDynamicObjectCount()<getDynamicObjectCount()<computeWindowMatrix()); else - osg::notify(osg::WARN)<<"osg::Matrix SceneView::computeMVPW() - error no viewport attached to SceneView, coords will be computed inccorectly."<addShader(new osg::Shader(osg::Shader::VERTEX, vertstr)); program->addShader(new osg::Shader(osg::Shader::FRAGMENT, fragstr)); diff --git a/src/osgUtil/Simplifier.cpp b/src/osgUtil/Simplifier.cpp index 97ce3781a..733079c1a 100644 --- a/src/osgUtil/Simplifier.cpp +++ b/src/osgUtil/Simplifier.cpp @@ -93,7 +93,7 @@ public: if (p1==0 || p2==0) { - osg::notify(osg::NOTICE)<<"Error computeInterpolatedPoint("<_p1 || !edge->_p2) { - osg::notify(osg::NOTICE)<<"Error updateErrorMetricForEdge("<getErrorMetric()==FLT_MAX) { - osg::notify(osg::INFO)<<"collapseMinimumErrorEdge() return false due to edge->getErrorMetric()==FLT_MAX"<getErrorMetric()==FLT_MAX"< pNew = edge->_proposedPoint.valid()? edge->_proposedPoint.get() : computeInterpolatedPoint(edge,0.5f); return (collapseEdge(edge,pNew.get())); } - osg::notify(osg::INFO)<<"collapseMinimumErrorEdge() return false due to _edgeSet.empty()"<getErrorMetric()==FLT_MAX) { - osg::notify(osg::INFO)<<"divideLongestEdge() return false due to edge->getErrorMetric()==FLT_MAX"<getErrorMetric()==FLT_MAX"< pNew = edge->_proposedPoint.valid()? edge->_proposedPoint.get() : computeInterpolatedPoint(edge,0.5f); return (divideEdge(edge,pNew.get())); } - osg::notify(osg::INFO)<<"divideLongestEdge() return false due to _edgeSet.empty()"<2) osg::notify(osg::NOTICE)<<"Warning too many triangles ("<<_triangles.size()<<") sharing edge "<2) OSG_NOTICE<<"Warning too many triangles ("<<_triangles.size()<<") sharing edge "<_triangles.begin(); itr1!=_p1->_triangles.end(); @@ -519,7 +519,7 @@ public: Triangle* addTriangle(unsigned int p1, unsigned int p2, unsigned int p3) { - //osg::notify(osg::NOTICE)<<"addTriangle("<_p1)) { - osg::notify(osg::NOTICE)<<"testTriangle("<_p1->_triangles.count(triangle)==0) { - osg::notify(osg::NOTICE)<<"testTriangle("<_triangles does not contain triangle"<_triangles does not contain triangle"<_p2)) { - osg::notify(osg::NOTICE)<<"testTriangle("<_p2->_triangles.count(triangle)==0) { - osg::notify(osg::NOTICE)<<"testTriangle("<_triangles does not contain triangle"<_triangles does not contain triangle"<_p3)) { - osg::notify(osg::NOTICE)<<"testTriangle("<_p3->_triangles.count(triangle)==0) { - osg::notify(osg::NOTICE)<<"testTriangle("<_triangles does not contain triangle"<_triangles does not contain triangle"<_e1.get())) { ++result; - osg::notify(osg::NOTICE)<<"testTriangle("<_e2.get())) { ++result; - osg::notify(osg::NOTICE)<<"testTriangle("<_e3.get())) { - osg::notify(osg::NOTICE)<<"testTriangle("< edge = new Edge; if (dereference_check_less(p1, p2)) { @@ -714,12 +714,12 @@ public: EdgeSet::iterator itr = _edgeSet.find(edge); if (itr==_edgeSet.end()) { - // osg::notify(osg::NOTICE)<<" addEdge("<_p1="<_p1.get()<<" _p2="<_p2.get()<_p1="<_p1.get()<<" _p2="<_p2.get()<_p1="<_p1.get()<<" _p2="<_p2.get()<_p1="<_p1.get()<<" _p2="<_p2.get()<getMaxNormalDeviationOnEdgeCollapse()>1.0) { - osg::notify(osg::NOTICE)<<"collapseEdge("<getMaxNormalDeviationOnEdgeCollapse() = "<getMaxNormalDeviationOnEdgeCollapse()<getMaxNormalDeviationOnEdgeCollapse() = "<getMaxNormalDeviationOnEdgeCollapse()<getMaxNormalDeviationOnEdgeCollapse() = "<getMaxNormalDeviationOnEdgeCollapse()<getMaxNormalDeviationOnEdgeCollapse() = "<getMaxNormalDeviationOnEdgeCollapse()<(titr_p2->get())); } - //osg::notify(osg::NOTICE)<<" pNew="<_triangles; @@ -967,13 +967,13 @@ public: edges2UpdateErrorMetric.insert(newEdges.begin(), newEdges.end()); - // osg::notify(osg::NOTICE)<<"Edges to recalibarate "<get()<<")"<get()<<")"<(itr->get())); } @@ -983,13 +983,13 @@ public: bool divideEdge(Edge* edge, Point* pNew) { - // osg::notify(osg::NOTICE)<<"divideEdge("<_p1.get(), pNew, tri->_p3.get());"<_p1.get(), pNew, tri->_p3.get());"<_p1.get(), pNew, tri->_p3.get()); - // osg::notify(osg::NOTICE)<<" newTri2 = addTriangle(pNew, tri->_p2.get(), tri->_p3.get());"<_p2.get(), tri->_p3.get());"<_p2.get(), tri->_p3.get()); break; case(2): // p2, p3 - // osg::notify(osg::NOTICE)<<" // p2, p3"<_p1.get(), tri->_p2.get(), pNew);"<_p1.get(), tri->_p2.get(), pNew);"<_p1.get(), tri->_p2.get(), pNew); - //osg::notify(osg::NOTICE)<<" newTri2 = addTriangle(tri->_p1.get(), pNew, tri->_p3.get());"<_p1.get(), pNew, tri->_p3.get());"<_p1.get(), pNew, tri->_p3.get()); break; case(3): // p3, p1 - // osg::notify(osg::NOTICE)<<" // p3, p1"<_p1.get(), tri->_p2.get(), pNew);"<_p1.get(), tri->_p2.get(), pNew);"<_p1.get(), tri->_p2.get(), pNew); - // osg::notify(osg::NOTICE)<<" newTri2 = addTriangle(pNew, tri->_p2.get(), tri->_p3.get());"<_p2.get(), tri->_p3.get());"<_p2.get(), tri->_p3.get()); break; } @@ -1083,7 +1083,7 @@ public: itr!=edges2UpdateErrorMetric.end(); ++itr) { - //osg::notify(osg::NOTICE)<<"updateErrorMetricForEdge("<get()<<")"<get()<<")"<valid()) updateErrorMetricForEdge(const_cast(itr->get())); } @@ -1091,10 +1091,10 @@ public: // unsigned int numEdges3 = _edgeSet.size(); // unsigned int numTriangles3 = _triangleSet.size(); - // osg::notify(osg::NOTICE)<<" numTriangles1="<_e1=="<_e1.get()<_e2=="<_e2.get()<_e3=="<_e3.get()<_e1=="<_e1.get()<_e2=="<_e2.get()<_e3=="<_e3.get()<_triangles.empty()) { - osg::notify(osg::NOTICE)<<"testEdge("<(itr->get()); - //osg::notify(osg::NOTICE)<<" reusePoint("<_triangles.insert(triangle); @@ -1202,10 +1202,10 @@ public: Triangle* triangle = const_cast(itr->get()); if (!(triangle->_p1 == point || triangle->_p2 == point || triangle->_p3 == point)) { - osg::notify(osg::NOTICE)<<"testPoint("<_p1 "<_p1.get()<_p2 "<_p2.get()<_p3 "<_p3.get()<_p1 "<_p1.get()<_p2 "<_p2.get()<_p3 "<_p3.get()<suitableForOptimization()) { // removing coord indices - osg::notify(osg::INFO)<<"EdgeCollapse::setGeometry(..): Removing attribute indices"<copyToAndOptimize(*_geometry); } @@ -1430,7 +1430,7 @@ void EdgeCollapse::setGeometry(osg::Geometry* geometry, const Simplifier::IndexL if (_geometry->containsSharedArrays()) { // removing coord indices - osg::notify(osg::INFO)<<"EdgeCollapse::setGeometry(..): Duplicate shared arrays"<duplicateSharedArrays(); } @@ -1749,7 +1749,7 @@ void Simplifier::simplify(osg::Geometry& geometry) void Simplifier::simplify(osg::Geometry& geometry, const IndexList& protectedPoints) { - osg::notify(osg::INFO)<<"++++++++++++++simplifier************"<=1.0); @@ -1764,10 +1764,10 @@ void Simplifier::simplify(osg::Geometry& geometry, const IndexList& protectedPoi continueSimplification((*ec._edgeSet.begin())->getErrorMetric() , numOriginalPrimitives, ec._triangleSet.size()) && ec.collapseMinimumErrorEdge()) { - //osg::notify(osg::INFO)<<" Collapsed edge ec._triangleSet.size()="<copyToAndOptimize(*geo); } @@ -127,7 +127,7 @@ void TangentSpaceGenerator::generate(osg::Geometry *geo, int normal_map_tex_unit case osg::PrimitiveSet::LINE_LOOP: break; - default: osg::notify(osg::WARN) << "Warning: TangentSpaceGenerator: unknown primitive mode " << pset->getMode() << "\n"; + default: OSG_WARN << "Warning: TangentSpaceGenerator: unknown primitive mode " << pset->getMode() << "\n"; } } @@ -199,7 +199,7 @@ void TangentSpaceGenerator::compute(osg::PrimitiveSet *pset, break; default: - osg::notify(osg::WARN) << "Warning: TangentSpaceGenerator: vertex array must be Vec2Array, Vec3Array or Vec4Array" << std::endl; + OSG_WARN << "Warning: TangentSpaceGenerator: vertex array must be Vec2Array, Vec3Array or Vec4Array" << std::endl; } osg::Vec3 N1; @@ -233,7 +233,7 @@ void TangentSpaceGenerator::compute(osg::PrimitiveSet *pset, break; default: - osg::notify(osg::WARN) << "Warning: TangentSpaceGenerator: normal array must be Vec2Array, Vec3Array or Vec4Array" << std::endl; + OSG_WARN << "Warning: TangentSpaceGenerator: normal array must be Vec2Array, Vec3Array or Vec4Array" << std::endl; } } @@ -266,7 +266,7 @@ void TangentSpaceGenerator::compute(osg::PrimitiveSet *pset, break; default: - osg::notify(osg::WARN) << "Warning: TangentSpaceGenerator: texture coord array must be Vec2Array, Vec3Array or Vec4Array" << std::endl; + OSG_WARN << "Warning: TangentSpaceGenerator: texture coord array must be Vec2Array, Vec3Array or Vec4Array" << std::endl; } if(nx){ diff --git a/src/osgUtil/Tessellator.cpp b/src/osgUtil/Tessellator.cpp index ccacd0e39..9541bcac4 100644 --- a/src/osgUtil/Tessellator.cpp +++ b/src/osgUtil/Tessellator.cpp @@ -30,7 +30,7 @@ Tessellator::Tessellator() : _index=0; #ifndef OSG_GLU_AVAILABLE - osg::notify(osg::NOTICE)<<"Warning: gluTesselation not supported."<getType()<<" not handled"<getType()<<" not handled"<=minimum_ratio_of_indices_to_unique_vertices) { - osg::notify(osg::INFO)<<"TriStripVisitor::stripify(Geometry&): doing tri strip"<< std::endl; + OSG_INFO<<"TriStripVisitor::stripify(Geometry&): doing tri strip"<< std::endl; unsigned int in_numVertices = 0; for(triangle_stripper::indices::iterator itr=taf._in_indices.begin(); @@ -412,14 +412,14 @@ void TriStripVisitor::stripify(Geometry& geom) stripifier.Strip(&outPrimitives); if (outPrimitives.empty()) { - osg::notify(osg::WARN)<<"Error: TriStripVisitor::stripify(Geometry& geom) failed."< QuadMap; @@ -560,7 +560,7 @@ void TriStripVisitor::stripify(Geometry& geom) } else { - osg::notify(osg::INFO)<<"TriStripVisitor::stripify(Geometry&): not doing tri strip *****************"<< std::endl; + OSG_INFO<<"TriStripVisitor::stripify(Geometry&): not doing tri strip *****************"<< std::endl; } }