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/FileIO/OBJ/OSGOBJSceneFileType.cpp

    r1039 r1063  
    136136NodeTransitPtr OBJSceneFileType::read(std::istream &is, const Char8 *) const 
    137137{ 
    138     NodeRefPtr rootPtr, nodePtr; 
     138    NodeInternalRefPtr rootPtr, nodePtr; 
    139139    std::string elem; 
    140140    std::map<std::string, DataElem>::const_iterator elemI; 
     
    143143    Vec2r vec2r; 
    144144    Real32 x,y,z; 
    145     GeoPnt3rProperty::ObjRefPtr coordPtr    = GeoPnt3rProperty::create(); 
    146     GeoVec2rProperty::ObjRefPtr texCoordPtr = GeoVec2rProperty::create(); 
    147     GeoVec3rProperty::ObjRefPtr normalPtr   = GeoVec3rProperty::create(); 
    148     Geometry::ObjRefPtr geoPtr; 
    149     GeoIntegralProperty::ObjRefPtr posIndexPtr, texIndexPtr, normalIndexPtr; 
    150     GeoIntegralProperty::ObjRefPtr lensPtr; 
    151     GeoIntegralProperty::ObjRefPtr typePtr; 
     145    GeoPnt3rProperty::ObjInternalRefPtr coordPtr    = GeoPnt3rProperty::create(); 
     146    GeoVec2rProperty::ObjInternalRefPtr texCoordPtr = GeoVec2rProperty::create(); 
     147    GeoVec3rProperty::ObjInternalRefPtr normalPtr   = GeoVec3rProperty::create(); 
     148    Geometry::ObjInternalRefPtr geoPtr; 
     149    GeoIntegralProperty::ObjInternalRefPtr posIndexPtr, texIndexPtr, normalIndexPtr; 
     150    GeoIntegralProperty::ObjInternalRefPtr lensPtr; 
     151    GeoIntegralProperty::ObjInternalRefPtr typePtr; 
    152152    DataElem dataElem; 
    153153    Char8 strBuf[8192], *token, *nextToken; 
     
    156156    Int32 i,j,n,primCount[3]; 
    157157    std::list<Mesh> meshList; 
    158     std::map<std::string, SimpleTexturedMaterialRefPtr> mtlMap; 
    159     std::map<std::string, SimpleTexturedMaterialRefPtr>::iterator mtlI; 
     158    std::map<std::string, SimpleTexturedMaterialInternalRefPtr> mtlMap; 
     159    std::map<std::string, SimpleTexturedMaterialInternalRefPtr>::iterator mtlI; 
    160160    Mesh emptyMesh; 
    161161    Face emptyFace; 
     
    461461                    { 
    462462                        rootPtr = Node::create(); 
    463                         rootPtr->setCore (GroupRefPtr(Group::create())); 
     463                        rootPtr->setCore (GroupInternalRefPtr(Group::create())); 
    464464                        rootPtr->addChild(nodePtr); 
    465465                    } 
     
    761761 
    762762Int32 OBJSceneFileType::readMTL ( const Char8 *fileName, 
    763                                   std::map<std::string, SimpleTexturedMaterialRefPtr> & mtlMap ) 
     763                                  std::map<std::string, SimpleTexturedMaterialInternalRefPtr> & mtlMap ) 
    764764  const 
    765765{ 
     
    787787 
    788788    std::ifstream in(fullFilePath.c_str()); 
    789     SimpleTexturedMaterialRefPtr mtlPtr; 
     789    SimpleTexturedMaterialInternalRefPtr mtlPtr; 
    790790    Real32 a,b,c; 
    791791    std::string elem; 
    792792    std::map<std::string, MaterialElem>::const_iterator elemI; 
    793793    MaterialElem mtlElem; 
    794     std::map<std::string, OSG::ImageRefPtr> imageMap; 
    795     std::map<std::string, OSG::ImageRefPtr>::iterator iI; 
    796     ImageRefPtr image; 
     794    std::map<std::string, OSG::ImageInternalRefPtr> imageMap; 
     795    std::map<std::string, OSG::ImageInternalRefPtr>::iterator iI; 
     796    ImageInternalRefPtr image; 
    797797    bool constDiffuse = false, constAmbient = false, constSpecular = false; 
    798798