Ignore:
Timestamp:
02/12/07 19:00:37 (17 years ago)
Author:
mattausch
Message:

changed pvs loading: loading objects in a first pass

File:
1 edited

Legend:

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

    r2113 r2115  
    2222#include "InternalRayCaster.h" 
    2323#include "GlobalLinesRenderer.h" 
     24#include "ObjectsParser.h" 
    2425 
    2526 
     
    730731        if (mLoadViewCells) 
    731732        {        
    732                 Environment::GetSingleton()->GetStringValue("ViewCells.filename", buf); 
    733                 cout << "loading view cells from " << buf << endl<<flush; 
     733        Environment::GetSingleton()->GetStringValue("ViewCells.filename", buf); 
     734                 
     735                cout << "loading objects from " << buf << endl; 
     736 
     737                // load objects which will be used as pvs entries 
     738                ObjectContainer pvsObjects; 
     739 
     740                LoadObjects(buf, pvsObjects, mObjects); 
     741 
     742                cout << "loading view cells from " << buf << endl; 
    734743 
    735744                mViewCellsManager = ViewCellsManager::LoadViewCells(buf,  
    736                                                                                                                         mObjects,  
     745                                                                                                                        pvsObjects, 
    737746                                                                                                                        mObjects,  
    738747                                                                                                                        true,  
     
    16261635 
    16271636 
    1628 } 
     1637bool Preprocessor::LoadObjects(const string &filename, 
     1638                                                           ObjectContainer &pvsObjects,  
     1639                                                           const ObjectContainer &preprocessorObjects) 
     1640{ 
     1641        ObjectsParser parser; 
     1642 
     1643        const bool success = parser.ParseObjects(filename,  
     1644                                                                                         pvsObjects,  
     1645                                                                                         preprocessorObjects); 
     1646 
     1647        if (!success) 
     1648        { 
     1649                Debug << "Error: loading objects failed!" << endl; 
     1650        } 
     1651 
     1652        // hack: no bvh object could be found => take preprocessor objects 
     1653        if (!pvsObjects.empty()) 
     1654        { 
     1655                pvsObjects = preprocessorObjects; 
     1656        } 
     1657 
     1658        return success; 
     1659} 
     1660 
     1661 
     1662} 
Note: See TracChangeset for help on using the changeset viewer.