Ignore:
Timestamp:
05/22/06 18:32:12 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsParser.cpp

    r974 r975  
    8383  , mBoundingBoxConverter(bconverter) 
    8484  , mEnvironment(env) 
    85 {Debug << "here22" << endl; 
    86         // mObjects = objects; 
     85{ 
    8786} 
    8887 
     
    117116  else 
    118117  { 
    119         if (element == "Interior") 
     118          if (element == "Interior") 
    120119                  EndBspInterior(); 
    121120  } 
     
    127126        // go one up in the tree 
    128127        if (mCurrentBspNode->GetParent()) 
    129         {       Debug << "öaaaaaaaaaaaa]"; 
     128        {       Debug << "]"; 
    130129                mCurrentBspNode = mCurrentBspNode->GetParent(); 
    131130        } 
     
    153152        // sort view cells to help associating view cells according to their id 
    154153        stable_sort(mViewCells.begin(), mViewCells.end(), vlt); 
     154        mParseViewCells = false; 
    155155} 
    156156 
     
    165165                mBoundingBoxConverter->IdentifyObjects(mIBoundingBoxes, *mObjects); 
    166166 
    167         Debug << "\nconverted bounding boxes to objects in" 
     167        Debug << "\nconverted bounding boxes to objects in " 
    168168                  << TimeDiff(startTime, GetTime()) * 1e-3 << " secs" << endl; 
    169169} 
     
    210210void ViewCellsParseHandlers::startElement(const XMLCh* const name, 
    211211                                                                                  AttributeList& attributes) 
    212 {       Debug << "here722" << endl; 
     212{ 
    213213        StrX lname(name); 
    214214        string element(lname.LocalForm()); 
    215215 
    216         // decides the used view cell hierarchy 
     216 
    217217        if (element == "ViewCells") 
    218218        { 
     
    221221        } 
    222222 
    223         if (element == "Hierarchy") 
    224         { 
    225                 Debug << "parsing spatial hierarchy" << endl; 
    226                 mParseViewCells = false; 
     223        // decides about the view cell hierarchy 
     224        if (element == "HierarchyType") 
     225        //if (element == "Hierarchy") 
     226        { 
     227                //Debug << "parsing spatial hierarchy" << endl; 
     228                //mParseViewCells = false; 
    227229                StartHierarchy(attributes); 
    228230        } 
     
    242244        } 
    243245 
    244         // use different methods for the given view cell hierarchy types 
     246         
    245247        if (!mParseViewCells) 
    246248        { 
     249                //-- use different methods for the given view cell hierarchy types 
    247250                if (mViewCellsManager) 
    248251                { 
     
    262265        else 
    263266        { 
     267                // interiors + leaves interpreted view cells else 
    264268                if (element == "Interior")  
    265269                { 
     
    620624                mViewCellsManager = new BspViewCellsManager(mBspTree, mEnvironment); 
    621625        } 
    622         else if (strcmp(name, "vspBspTree") == 0) 
    623         { 
    624                 Debug << "view cell type: VspBsp" << endl; 
    625  
    626                 mVspBspTree = new VspBspTree(); 
    627                 //mCurrentBspNode = mVspBspTree->GetRoot(); 
    628                 mViewCellsManager = new VspBspViewCellsManager(mVspBspTree, mEnvironment); 
    629  
    630                 mVspBspTree->mBox = mViewSpaceBox; 
    631         } 
     626         
    632627        else if (strcmp(name, "vspKdTree") == 0) 
    633628        { 
     
    637632                mViewCellsManager = new VspKdViewCellsManager(mVspKdTree, mEnvironment); 
    638633        } 
    639         else 
    640         { 
    641                 cerr << "Wrong view cells type: " << name << endl; 
    642                 exit(1); 
     634        else // vspBspTree 
     635        { 
     636                Debug << "view cell type: VspBsp" << endl; 
     637 
     638                mVspBspTree = new VspBspTree(); 
     639                //mCurrentBspNode = mVspBspTree->GetRoot(); 
     640                mViewCellsManager = new VspBspViewCellsManager(mVspBspTree, mEnvironment); 
     641 
     642                mVspBspTree->mBox = mViewSpaceBox; 
    643643        } 
    644644 
     
    720720    } 
    721721   
    722   Debug << "here2" << endl; 
    723722  // 
    724723  //  Create a SAX parser object. Then, according to what we were told on 
     
    759758         
    760759        GzFileInputSource isource(myFilePath); 
    761         Debug << "here4" << endl; 
    762760        parser->parse(isource); 
    763761 
Note: See TracChangeset for help on using the changeset viewer.