Ignore:
Timestamp:
05/03/06 01:13:24 (18 years ago)
Author:
mattausch
Message:

added filter to online stuff (not fully working, too slow
)

Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
5 edited

Legend:

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

    r870 r880  
    174174{ 
    175175        return mPvs; 
     176} 
     177 
     178 
     179void ViewCell::SetPvs(const ObjectPvs &pvs) 
     180{ 
     181        mPvs = pvs; 
    176182} 
    177183 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.h

    r860 r880  
    117117 
    118118        ObjectPvs &GetPvs(); 
     119 
     120        void SetPvs(const ObjectPvs &pvs); 
    119121 
    120122        /** Type of view cells. 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r879 r880  
    49594959        Vector3 bsize = mViewSpaceBox.Size(); 
    49604960        const Vector3 viewPoint(mViewSpaceBox.Center()); 
    4961         float w = Magnitude(mViewSpaceBox.Size())*mFilterWidth; 
     4961        float w = Magnitude(mViewSpaceBox.Size()) * mFilterWidth; 
    49624962        const Vector3 width = Vector3(w); 
    49634963         
     
    49804980 
    49814981                exporter->SetForcedMaterial(RgbColor(0,1,0)); 
    4982                 ExportViewCellGeometry(exporter,  GetViewCell(viewPoint)); 
     4982                ExportViewCellGeometry(exporter, GetViewCell(viewPoint)); 
    49834983 
    49844984                //exporter->ResetForcedMaterial(); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h

    r879 r880  
    4343  ViewCell *mViewCell; 
    4444 
    45   // input parameter is the render budget for the PrVS 
     45  // input parameter is the render budget for the PrVs 
    4646  float mRenderBudget; 
    4747 
     
    467467                                                                                ViewCellContainer &viewCells) const; 
    468468 
     469        /** Tests the visibility filter functionality. 
     470        */ 
    469471        virtual void TestFilter(const ObjectContainer &objects) {}; 
    470472 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsParser.cpp

    r870 r880  
    300300                                  lower_bound(mObjects->begin(), mObjects->end(), (Intersectable *)&dummyInst, ilt); 
    301301                                 
    302                                 Intersectable *obj = *oit; 
    303                                  
    304                                 if (obj->GetId() == objId) 
     302                                                         
     303                                if ((oit != mObjects->end()) && ((*oit)->GetId() == objId)) 
    305304                                { 
    306                                   // $$JB we should store a float a per object which corresponds 
    307                                   // to sumof pdfs, i.e. its relative visibility 
    308                                   // temporarily set to 1.0f 
    309                                         viewCell->GetPvs().AddSample(obj, 1.0f);                                 
     305                                        // $$JB we should store a float a per object which corresponds 
     306                                        // to sumof pdfs, i.e. its relative visibility 
     307                                        // temporarily set to 1.0f 
     308                                        viewCell->GetPvs().AddSample(*oit, 1.0f);                                
    310309                                } 
    311310                                else 
    312311                                { 
    313                                         Debug << "error: object does not exist" << endl; 
     312                                        Debug << "error: object with id " << objId << " does not exist" << endl; 
    314313                                } 
    315314                        } 
Note: See TracChangeset for help on using the changeset viewer.