Ignore:
Timestamp:
01/15/07 16:28:59 (17 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r1977 r1981  
    22922292                return 0.0f; 
    22932293 
    2294         static Ray hray; 
    2295         hray.Init(ray); 
    2296  
    2297         float tmin = 0, tmax = 1.0; 
    2298  
    2299         if (!GetViewSpaceBox().GetRaySegment(hray, tmin, tmax) || (tmin > tmax)) 
    2300         { 
    2301                 // cerr<<"ray outside view space box\n"; 
    2302                 return 0; 
    2303         } 
    2304  
    2305         Vector3 origin = hray.Extrap(tmin); 
    2306         Vector3 termination = hray.Extrap(tmax); 
    2307  
    2308         // traverse the view space subdivision 
    2309         if (!LineSegmentIntersects(origin,  
    2310                                                            termination,  
    2311                                                            currentViewCell)) 
    2312         { 
    2313                 return 0; 
    2314         } 
    2315          
    23162294        // optain pvs entry (can be different from hit object) 
    23172295        Intersectable *terminationObj = GetIntersectable(ray, true); 
     
    23262304        float c = 0.0f; 
    23272305        if (terminationObj)  
    2328           c = ray.Length(); 
     2306                c = ray.Length(); 
     2307 
    23292308        ray.mRelativePvsContribution = ray.mPvsContribution = c; 
    23302309        return c; 
     
    59425921                mColorCode = 0; // 0 = random, 1 = export pvs 
    59435922 
     5923                if (0) 
    59445924                mHierarchyManager->ExportObjectSpaceHierarchy(exporter, objects,  
    59455925                                                                                                          CLAMP_TO_BOX ? &bbox : NULL, maxRenderCost, false); 
     
    59795959                const float maxRenderCost = -1; 
    59805960 
     5961                if (0) 
    59815962                mHierarchyManager->ExportObjectSpaceHierarchy(exporter, objects,  
    59825963                                                                                                          CLAMP_TO_BOX ? &bbox : NULL, maxRenderCost, false); 
     
    59925973        } 
    59935974 
    5994 #if 0 
    5995         // export final object partition 
    5996         exporter = Exporter::GetExporter("final_object_partition.wrl"); 
    5997  
    5998         if (exporter) 
    5999         { 
    6000                 if (CLAMP_TO_BOX) 
    6001                 {        
    6002                         exporter->mClampToBox = true;    
    6003                 } 
    6004  
    6005                 const long starttime = GetTime(); 
    6006  
    6007                 // matt: hack for making visualization smaller in size 
    6008                 AxisAlignedBox3 bbox = mHierarchyManager->GetObjectSpaceBox(); 
    6009                 bbox.Scale(scale); 
    6010  
    6011                 cout << "exporting object space hierarchy ... "; 
    6012                 mHierarchyManager->ExportObjectSpaceHierarchy(exporter, objects, CLAMP_TO_BOX ? &bbox : NULL, -1); 
    6013  
    6014                 delete exporter; 
    6015                 cout << "finished in " << TimeDiff(starttime, GetTime()) * 1e-3f << " secs" << endl; 
    6016         } 
    6017 #endif 
    6018  
    6019         // visualization of the view cells 
     5975        // visualization of the merged view cells 
    60205976    if (0)  
    60215977        {        
Note: See TracChangeset for help on using the changeset viewer.