Ignore:
Timestamp:
05/22/06 07:53:18 (18 years ago)
Author:
mattausch
Message:

added stuff for view cell ziping (not working yet!)

File:
1 edited

Legend:

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

    r955 r971  
    3030#include "VspKdTree.h" 
    3131#include "ViewCellsManager.h" 
     32#include "GzFileInputSource.h" 
    3233 
    3334namespace GtpVisibilityPreprocessor { 
     
    8283  , mBoundingBoxConverter(bconverter) 
    8384  , mEnvironment(env) 
    84 { 
     85{Debug << "here22" << endl; 
    8586        // mObjects = objects; 
    8687} 
     
    126127        // go one up in the tree 
    127128        if (mCurrentBspNode->GetParent()) 
    128         {       cout << "]"; 
     129        {       Debug << "]"; 
    129130                mCurrentBspNode = mCurrentBspNode->GetParent(); 
    130131        } 
     
    136137        // go one up in the tree 
    137138        if (mCurrentViewCell->GetParent()) 
    138         {       cout << "]"; 
     139        {       Debug << "]"; 
    139140                mCurrentViewCell = mCurrentViewCell->GetParent(); 
    140141        } 
     
    195196        if (element == "Interior")  
    196197        { 
    197                 cout << "["; 
     198                Debug << "["; 
    198199                StartBspInterior(attributes); 
    199200        } 
     
    201202        if (element == "Leaf")  
    202203        { 
    203                 cout << "l"; 
     204                Debug << "l"; 
    204205                StartBspLeaf(attributes); 
    205206        } 
     
    209210void ViewCellsParseHandlers::startElement(const XMLCh* const name, 
    210211                                                                                  AttributeList& attributes) 
    211 { 
     212{       Debug << "here722" << endl; 
    212213        StrX lname(name); 
    213214        string element(lname.LocalForm()); 
    214          
     215 
    215216        // decides the used view cell hierarchy 
    216217        if (element == "ViewCells") 
    217218        { 
    218                 cout << "parsing view cells" << endl; 
     219                Debug << "parsing view cells" << endl; 
    219220                mParseViewCells = true; 
    220221        } 
     
    222223        if (element == "Hierarchy") 
    223224        { 
    224                 cout << "parsing spatial hierarchy" << endl; 
     225                Debug << "parsing spatial hierarchy" << endl; 
    225226                mParseViewCells = false; 
    226227                StartHierarchy(attributes); 
     
    230231        if (element == "ViewSpaceBox") 
    231232        { 
    232                 cout << "v"; 
     233                Debug << "v"; 
    233234                StartViewSpaceBox(attributes); 
    234235        } 
     
    237238        if (element == "BoundingBox") 
    238239        { 
    239                 cout << "b"; 
     240                Debug << "b"; 
    240241                StartBoundingBox(attributes); 
    241242        } 
     
    263264                if (element == "Interior")  
    264265                { 
    265                         cout << "["; 
     266                        Debug << "["; 
    266267                        StartViewCellInterior(attributes); 
    267268                } 
     
    269270                if (element == "Leaf")  
    270271                { 
    271                         cout << "l"; 
     272                        Debug << "l"; 
    272273                        StartViewCellLeaf(attributes); 
    273274                } 
     
    719720    } 
    720721   
    721    
     722  Debug << "here2" << endl; 
    722723  // 
    723724  //  Create a SAX parser object. Then, according to what we were told on 
     
    754755      { 
    755756        const unsigned long startMillis = XMLPlatformUtils::getCurrentMillis(); 
     757#if ZIPPED_VIEWCELLS 
     758        XMLCh *myFilePath = XMLString::transcode(filename.c_str()); 
     759         
     760        GzFileInputSource isource(myFilePath); 
     761        Debug << "here4" << endl; 
     762        parser->parse(isource); 
     763 
     764#else 
    756765        parser->parse(filename.c_str()); 
    757         //ogzstream stream; parser->parse(stream); 
     766#endif 
     767 
    758768        const unsigned long endMillis = XMLPlatformUtils::getCurrentMillis(); 
    759769        duration = endMillis - startMillis; 
Note: See TracChangeset for help on using the changeset viewer.