Ignore:
Timestamp:
11/07/05 11:27:38 (19 years ago)
Author:
bittner
Message:

VssPreprocessor? updates - directional rays, x3dexporter updates - removed duplicated code for ray exports

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.cpp

    r385 r386  
    386386  int pvsOut = Min((int)objects.size(), 10); 
    387387 
    388   vector<Ray> rays[10]; 
     388  RayContainer rays[10]; 
    389389 
    390390  while (totalSamples < mTotalSamples) { 
     
    455455                                        } 
    456456 
    457                                         if ( i < pvsOut ) 
    458                                                 rays[i].push_back(ray); 
     457                                        if ( i < pvsOut ) { 
     458                                                Ray *nray = new Ray(ray); 
     459                                                rays[i].push_back(nray); 
     460                                        } 
    459461                 
    460462                                        if (!ray.intersections.empty()) { 
     
    462464                                                for (int j = 0; j < pvsOut; j++) { 
    463465                                                        if (objects[j] == ray.intersections[0].mObject) { 
    464                                                                 rays[j].push_back(ray); 
     466                                                                Ray *nray = new Ray(ray); 
     467                                                                rays[j].push_back(nray); 
    465468                                                        } 
    466469                                                } 
     
    635638 
    636639                for (i=0; i < pvsOut; i++)  
    637                 exporter->ExportRays(rays[i], 1000, RgbColor(1, 0, 0)); 
     640                        exporter->ExportRays(rays[i], 1000, RgbColor(1, 0, 0)); 
    638641                exporter->SetFilled(); 
    639                    
     642                 
    640643                delete exporter; 
    641644        } 
     
    833836                //-- some random view cells and rays for output 
    834837                const int raysOut = min((int)mSampleRays.size(), 20000); 
    835                 vector<Ray> vcRays[leafOut]; 
     838                vector<Ray *> vcRays[leafOut]; 
    836839                vector<BspLeaf *> bspLeaves; 
    837840                for (int i = 0; i < leafOut; ++ i) 
     
    852855                                        if (bspLeaves[i]->GetViewCell() == leaf->GetViewCell())  
    853856                                        { 
    854                                                 vcRays[i].push_back(*ray); 
     857                                                vcRays[i].push_back(ray); 
    855858                                        } 
    856859                                } 
Note: See TracChangeset for help on using the changeset viewer.