Show
Ignore:
Timestamp:
05/28/10 18:25:41 (5 years ago)
Author:
robert
Message:

Converted osg::notify to OSG_INFO etc.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/Inventor/ConvertToInventor.cpp

    r11032 r11491  
    203203{ 
    204204#ifdef DEBUG_IV_WRITER 
    205   osg::notify(osg::INFO) << "IvWriter: node traversed" << std::endl; 
     205  OSG_INFO << "IvWriter: node traversed" << std::endl; 
    206206#endif 
    207207 
     
    416416  }; 
    417417 
    418   osg::notify(osg::WARN) << "IvWriter: No direct conversion for array. " 
     418  OSG_WARN << "IvWriter: No direct conversion for array. " 
    419419    << "The file may be broken." << std::endl; 
    420420} 
     
    485485                                 srcField->getNum(), drawElemIndices, numToProcess); 
    486486    else { 
    487       osg::notify(osg::WARN) << "IvWriter: NOT IMPLEMENTED" << std::endl; 
     487      OSG_WARN << "IvWriter: NOT IMPLEMENTED" << std::endl; 
    488488      assert(0); // FIXME: 
    489489    } 
     
    491491    destField->finishEditing(); 
    492492    if (!ok) 
    493       osg::notify(osg::WARN) << "IvWriter: Can not deindex - bug in model: index out of range." << std::endl; 
     493      OSG_WARN << "IvWriter: Can not deindex - bug in model: index out of range." << std::endl; 
    494494 
    495495  } else { 
     
    518518      osgArray2ivMField(drawElemIndices, ivIndices, startIndex, stopIndex, numItemsUntilMinusOne); 
    519519    else { 
    520       osg::notify(osg::WARN) << "IvWriter: NOT IMPLEMENTED" << std::endl; 
     520      OSG_WARN << "IvWriter: NOT IMPLEMENTED" << std::endl; 
    521521      assert(0); // FIXME: 
    522522    } 
     
    830830        // warn if face culling is on 
    831831        if (ivState->osgCullFaceEnabled) 
    832           osg::notify(osg::WARN) << "IvWriter: Using face culling and two-sided lighting together! " 
     832          OSG_WARN << "IvWriter: Using face culling and two-sided lighting together! " 
    833833                                    "Ignoring face culling." << std::endl; 
    834834 
     
    849849            // Warn if culling the lit faces while rendering unlit faces. 
    850850            // Inventor does not support this setup and it lits the unculled faces only. 
    851             osg::notify(osg::WARN) << "IvWriter: Culling was set in a way that one-sided lighting will lit the culled sides of faces. " 
     851            OSG_WARN << "IvWriter: Culling was set in a way that one-sided lighting will lit the culled sides of faces. " 
    852852                                      "Using lighting on correct faces." << std::endl;  
    853853 
     
    947947          ivState->osgMaterial->getEmissionFrontAndBack() == false || 
    948948          ivState->osgMaterial->getShininessFrontAndBack() == false) 
    949         osg::notify(osg::WARN) << "IvWriter: Model contains different materials for front and " 
     949      { 
     950        OSG_WARN << "IvWriter: Model contains different materials for front and " 
    950951                                  "back faces. This is not handled properly. Using front material only." << std::endl; 
    951  
     952      } 
    952953     
    953954      // Convert colors 
     
    958959      // alpha and SoBaseColor may be useful on pre-lit scene. 
    959960      if (ivState->osgMaterial->getColorMode() != osg::Material::DIFFUSE && 
    960           ivState->osgMaterial->getColorMode() != osg::Material::OFF) { 
    961  
    962       if (ivState->osgMaterial->getColorMode() == osg::Material::AMBIENT_AND_DIFFUSE) 
    963         osg::notify(osg::WARN) << "IvWriter: The model is using AMBIENT_AND_DIFFUSE material " 
    964                                   "mode while Inventor supports DIFFUSE mode only. " 
    965                                   "The model colors may not much exactly." << std::endl; 
    966       else 
    967         osg::notify(osg::WARN) << "IvWriter: The model is not using DIFFUSE material mode and " 
    968                                   "Inventor supports DIFFUSE mode only. " 
    969                                   "The model colors may not be correct." << std::endl; 
     961          ivState->osgMaterial->getColorMode() != osg::Material::OFF) 
     962      { 
     963 
     964        if (ivState->osgMaterial->getColorMode() == osg::Material::AMBIENT_AND_DIFFUSE) 
     965        { 
     966            OSG_WARN << "IvWriter: The model is using AMBIENT_AND_DIFFUSE material " 
     967                                    "mode while Inventor supports DIFFUSE mode only. " 
     968                                    "The model colors may not much exactly." << std::endl; 
     969        } 
     970        else 
     971        { 
     972            OSG_WARN << "IvWriter: The model is not using DIFFUSE material mode and " 
     973                                    "Inventor supports DIFFUSE mode only. " 
     974                                    "The model colors may not be correct." << std::endl; 
     975        } 
    970976      } 
    971977 
     
    13191325          break; 
    13201326      default: 
    1321           osg::notify(osg::WARN) << "IvWriter: NOT IMPLEMENTED" << std::endl; 
     1327          OSG_WARN << "IvWriter: NOT IMPLEMENTED" << std::endl; 
    13221328          assert(0); 
    13231329      } 
     
    13471353          break; 
    13481354      case GL_TRIANGLE_FAN: 
    1349           osg::notify(osg::WARN) << "IvWriter: GL_TRIANGLE_FAN NOT IMPLEMENTED" << std::endl; 
     1355          OSG_WARN << "IvWriter: GL_TRIANGLE_FAN NOT IMPLEMENTED" << std::endl; 
    13501356          ((SoTriangleStripSet*)shape)->numVertices.setNum(1); 
    13511357          ((SoTriangleStripSet*)shape)->numVertices.set1Value(0, elementsCount); 
     
    13661372          break; 
    13671373      default: 
    1368           osg::notify(osg::WARN) << "IvWriter: NOT IMPLEMENTED" << std::endl; 
     1374          OSG_WARN << "IvWriter: NOT IMPLEMENTED" << std::endl; 
    13691375          assert(0); 
    13701376      } 
     
    13941400          break; 
    13951401      default: 
    1396           osg::notify(osg::WARN) << "IvWriter: NOT IMPLEMENTED" << std::endl; 
     1402          OSG_WARN << "IvWriter: NOT IMPLEMENTED" << std::endl; 
    13971403          assert(0); 
    13981404      } 
    13991405    } else { 
    1400       osg::notify(osg::WARN) << "IvWriter: NOT IMPLEMENTED" << std::endl; 
     1406      OSG_WARN << "IvWriter: NOT IMPLEMENTED" << std::endl; 
    14011407      assert(0 && "Unknown non-indexed shape type."); 
    14021408    } 
     
    17151721 
    17161722      default: 
    1717         osg::notify(osg::WARN) << "IvWriter: NOT IMPLEMENTED" << std::endl; 
     1723        OSG_WARN << "IvWriter: NOT IMPLEMENTED" << std::endl; 
    17181724    } 
    17191725  } 
     
    17911797     
    17921798    void warnNonSupported() { 
    1793       osg::notify(osg::WARN) << "IvWriter: Not supported ShapeDrawable found. Skipping it." << std::endl; 
     1799      OSG_WARN << "IvWriter: Not supported ShapeDrawable found. Skipping it." << std::endl; 
    17941800    } 
    17951801    virtual void apply(const osg::Capsule&)        { warnNonSupported(); } 
     
    18271833  } 
    18281834  else 
    1829     osg::notify(osg::WARN) << "IvWriter: Unsupported drawable found: \"" << d->className() << 
     1835    OSG_WARN << "IvWriter: Unsupported drawable found: \"" << d->className() << 
    18301836                              "\". Skipping it." << std::endl; 
    18311837 
     
    18381844{ 
    18391845#ifdef DEBUG_IV_WRITER 
    1840   osg::notify(osg::INFO) << "IvWriter: Geode traversed" << std::endl; 
     1846  OSG_INFO << "IvWriter: Geode traversed" << std::endl; 
    18411847#endif 
    18421848 
     
    18591865{ 
    18601866#ifdef DEBUG_IV_WRITER 
    1861   osg::notify(osg::INFO) << "IvWriter: Group traversed" << std::endl; 
     1867  OSG_INFO << "IvWriter: Group traversed" << std::endl; 
    18621868#endif 
    18631869 
     
    18741880{ 
    18751881#ifdef DEBUG_IV_WRITER 
    1876   osg::notify(osg::INFO) << "IvWriter: Billboard traversed" << std::endl; 
     1882  OSG_INFO << "IvWriter: Billboard traversed" << std::endl; 
    18771883#endif 
    18781884 
     
    19521958{ 
    19531959#ifdef DEBUG_IV_WRITER 
    1954   osg::notify(osg::INFO) << "IvWriter: MatrixTransform traversed" << std::endl; 
     1960  OSG_INFO << "IvWriter: MatrixTransform traversed" << std::endl; 
    19551961#endif 
    19561962 
     
    19771983{ 
    19781984#ifdef DEBUG_IV_WRITER 
    1979   osg::notify(osg::INFO) << "IvWriter: PositionAttitudeTransform traversed" << std::endl; 
     1985  OSG_INFO << "IvWriter: PositionAttitudeTransform traversed" << std::endl; 
    19801986#endif 
    19811987 
     
    19972003{ 
    19982004#ifdef DEBUG_IV_WRITER 
    1999   osg::notify(osg::INFO) << "IvWriter: LOD traversed" << std::endl; 
     2005  OSG_INFO << "IvWriter: LOD traversed" << std::endl; 
    20002006#endif 
    20012007 
     
    20352041     
    20362042    // undefined mode -> put warning 
    2037     osg::notify(osg::WARN) << "IvWriter: Undefined LOD::RangeMode value." << std::endl; 
     2043    OSG_WARN << "IvWriter: Undefined LOD::RangeMode value." << std::endl; 
    20382044    ivLOD = new SoGroup; 
    20392045  }