Show
Ignore:
Timestamp:
02/27/08 09:30:29 (9 months ago)
Author:
cneumann
Message:

fixed: Overzealous use of RefPtr? replaced with InternalRefPtr?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/Carsten_PtrWork2/Source/System/GraphOp/OSGMergeGraphOp.cpp

    r1039 r1063  
    392392    Node::ChildrenFieldType::const_iterator en = node->getMFChildren()->end  (); 
    393393     
    394     std::vector<NodeRefPtr> toAdd; 
    395     std::vector<NodeRefPtr> toSub; 
     394    std::vector<NodeInternalRefPtr> toAdd; 
     395    std::vector<NodeInternalRefPtr> toSub; 
    396396     
    397397    for ( ; it != en; ++it ) 
     
    429429                                GeometryPtr geo_old = dynamic_cast<GeometryPtr>((*it2)->getCore()); 
    430430                                //GeometryPtr geo = geo_old->clone(); 
    431                                 GeometryRefPtr geo = boost::dynamic_pointer_cast<Geometry>(OSG::deepClone(geo_old, "Material")); 
     431                                GeometryInternalRefPtr geo = boost::dynamic_pointer_cast<Geometry>(OSG::deepClone(geo_old, "Material")); 
    432432                                TransformPtr  t = dynamic_cast<TransformPtr>((*it)->getCore()); 
    433433                                GeoPnt3fPropertyPtr pos  = dynamic_cast<GeoPnt3fPropertyPtr>(geo->getPositions()); 
     
    534534                                (*it2)->setCore(geo); 
    535535                                 
    536                                 toAdd.push_back(NodeRefPtr(*it2)); 
     536                                toAdd.push_back(NodeInternalRefPtr(*it2)); 
    537537                            } 
    538538                        } else empty=false; 
     
    544544            if ((empty||leaf) && !special) 
    545545            { 
    546                 toSub.push_back(NodeRefPtr(*it)); 
     546                toSub.push_back(NodeInternalRefPtr(*it)); 
    547547                continue; 
    548548            } 
     
    560560    } 
    561561     
    562     std::vector<NodeRefPtr>::const_iterator addI = toAdd.begin(); 
    563     std::vector<NodeRefPtr>::const_iterator addE = toAdd.end  (); 
     562    std::vector<NodeInternalRefPtr>::const_iterator addI = toAdd.begin(); 
     563    std::vector<NodeInternalRefPtr>::const_iterator addE = toAdd.end  (); 
    564564     
    565565    for(; addI != addE; ++addI) 
     
    568568    } 
    569569     
    570     std::vector<NodeRefPtr>::const_iterator subI = toSub.begin(); 
    571     std::vector<NodeRefPtr>::const_iterator subE = toSub.end  (); 
     570    std::vector<NodeInternalRefPtr>::const_iterator subI = toSub.begin(); 
     571    std::vector<NodeInternalRefPtr>::const_iterator subE = toSub.end  (); 
    572572     
    573573    for (; subI != subE; ++subI) 
     
    582582    Node::ChildrenFieldType::const_iterator en = node->getMFChildren()->end  (); 
    583583     
    584     std::vector<NodeRefPtr> toSub; 
    585     std::vector<NodeRefPtr> toAdd; 
     584    std::vector<NodeInternalRefPtr> toSub; 
     585    std::vector<NodeInternalRefPtr> toAdd; 
    586586     
    587587    for ( ; it != en; ++it ) 
     
    598598            bool inSubList=false; 
    599599 
    600             std::vector<NodeRefPtr>::const_iterator it3 = toSub.begin(); 
    601             std::vector<NodeRefPtr>::const_iterator en3 = toSub.end(); 
     600            std::vector<NodeInternalRefPtr>::const_iterator it3 = toSub.begin(); 
     601            std::vector<NodeInternalRefPtr>::const_iterator en3 = toSub.end(); 
    602602 
    603603            for ( ; it3 != en3; ++it3 )  
     
    608608                //ok, try 
    609609                std::vector<NodePtr>::const_iterator it2=it+1; 
    610                 GeometryRefPtr new_geo; 
     610                GeometryInternalRefPtr new_geo; 
    611611                for ( ; it2!=en; ++it2) 
    612612                { 
     
    644644                if (new_geo!=NullFC) 
    645645                { 
    646                     NodeRefPtr new_node = Node::create(); 
     646                    NodeInternalRefPtr new_node = Node::create(); 
    647647                    new_node->setCore(new_geo); 
    648648 
     
    657657    } 
    658658     
    659     std::vector<NodeRefPtr>::const_iterator addI = toAdd.begin(); 
    660     std::vector<NodeRefPtr>::const_iterator addE = toAdd.end  (); 
     659    std::vector<NodeInternalRefPtr>::const_iterator addI = toAdd.begin(); 
     660    std::vector<NodeInternalRefPtr>::const_iterator addE = toAdd.end  (); 
    661661     
    662662    for(; addI != addE; ++addI) 
     
    665665    } 
    666666 
    667     std::vector<NodeRefPtr>::const_iterator subI = toSub.begin(); 
    668     std::vector<NodeRefPtr>::const_iterator subE = toSub.end  (); 
     667    std::vector<NodeInternalRefPtr>::const_iterator subI = toSub.begin(); 
     668    std::vector<NodeInternalRefPtr>::const_iterator subE = toSub.end  (); 
    669669     
    670670    for (; subI != subE; ++subI)