Ignore:
Timestamp:
06/19/06 17:07:49 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r1021 r1022  
    23102310/*****************************************************************/ 
    23112311 
     2312OspTree::OspTree(): 
     2313mRoot(NULL) 
     2314#if TODO 
     2315mOutOfBoundsCell(NULL), 
     2316mStoreRays(false), 
     2317mUseRandomAxis(false), 
     2318mTimeStamp(1) 
     2319#endif 
     2320{ 
     2321#if TODO 
     2322        bool randomize = false; 
     2323        Environment::GetSingleton()->GetBoolValue("VspTree.Construction.randomize", randomize); 
     2324        if (randomize) 
     2325                Randomize(); // initialise random generator for heuristics 
     2326 
     2327        //-- termination criteria for autopartition 
     2328        Environment::GetSingleton()->GetIntValue("VspTree.Termination.maxDepth", mTermMaxDepth); 
     2329        Environment::GetSingleton()->GetIntValue("VspTree.Termination.minPvs", mTermMinPvs); 
     2330        Environment::GetSingleton()->GetIntValue("VspTree.Termination.minRays", mTermMinRays); 
     2331        Environment::GetSingleton()->GetFloatValue("VspTree.Termination.minProbability", mTermMinProbability); 
     2332        Environment::GetSingleton()->GetFloatValue("VspTree.Termination.maxRayContribution", mTermMaxRayContribution); 
     2333        Environment::GetSingleton()->GetFloatValue("VspTree.Termination.maxCostRatio", mTermMaxCostRatio); 
     2334        Environment::GetSingleton()->GetIntValue("VspTree.Termination.missTolerance", mTermMissTolerance); 
     2335        Environment::GetSingleton()->GetIntValue("VspTree.Termination.maxViewCells", mMaxViewCells); 
     2336 
     2337        //-- max cost ratio for early tree termination 
     2338        Environment::GetSingleton()->GetFloatValue("VspTree.Termination.maxCostRatio", mTermMaxCostRatio); 
     2339 
     2340        Environment::GetSingleton()->GetFloatValue("VspTree.Termination.minGlobalCostRatio", mTermMinGlobalCostRatio); 
     2341        Environment::GetSingleton()->GetIntValue("VspTree.Termination.globalCostMissTolerance", mTermGlobalCostMissTolerance); 
     2342 
     2343        // HACK//mTermMinPolygons = 25; 
     2344 
     2345        //-- factors for bsp tree split plane heuristics 
     2346        Environment::GetSingleton()->GetFloatValue("VspTree.Termination.ct_div_ci", mCtDivCi); 
     2347 
     2348        //-- partition criteria 
     2349        Environment::GetSingleton()->GetFloatValue("VspTree.Construction.epsilon", mEpsilon); 
     2350 
     2351        // if only the driving axis is used for axis aligned split 
     2352        Environment::GetSingleton()->GetBoolValue("VspTree.splitUseOnlyDrivingAxis", mOnlyDrivingAxis); 
     2353         
     2354        //Environment::GetSingleton()->GetFloatValue("VspTree.maxTotalMemory", mMaxTotalMemory); 
     2355        Environment::GetSingleton()->GetFloatValue("VspTree.maxStaticMemory", mMaxMemory); 
     2356 
     2357        Environment::GetSingleton()->GetBoolValue("VspTree.useCostHeuristics", mUseCostHeuristics); 
     2358        Environment::GetSingleton()->GetBoolValue("VspTree.simulateOctree", mCirculatingAxis); 
     2359        Environment::GetSingleton()->GetBoolValue("VspTree.useRandomAxis", mUseRandomAxis); 
     2360        Environment::GetSingleton()->GetIntValue("VspTree.nodePriorityQueueType", mNodePriorityQueueType); 
     2361         
     2362        char subdivisionStatsLog[100]; 
     2363        Environment::GetSingleton()->GetStringValue("VspTree.subdivisionStats", subdivisionStatsLog); 
     2364        mSubdivisionStats.open(subdivisionStatsLog); 
     2365 
     2366        Environment::GetSingleton()->GetFloatValue("VspTree.Construction.minBand", mMinBand); 
     2367        Environment::GetSingleton()->GetFloatValue("VspTree.Construction.maxBand", mMaxBand); 
     2368         
     2369 
     2370        //-- debug output 
     2371 
     2372        Debug << "******* VSP BSP options ******** " << endl; 
     2373    Debug << "max depth: " << mTermMaxDepth << endl; 
     2374        Debug << "min PVS: " << mTermMinPvs << endl; 
     2375        Debug << "min probabiliy: " << mTermMinProbability << endl; 
     2376        Debug << "min rays: " << mTermMinRays << endl; 
     2377        Debug << "max ray contri: " << mTermMaxRayContribution << endl; 
     2378        Debug << "max cost ratio: " << mTermMaxCostRatio << endl; 
     2379        Debug << "miss tolerance: " << mTermMissTolerance << endl; 
     2380        Debug << "max view cells: " << mMaxViewCells << endl; 
     2381        Debug << "randomize: " << randomize << endl; 
     2382 
     2383        Debug << "min global cost ratio: " << mTermMinGlobalCostRatio << endl; 
     2384        Debug << "global cost miss tolerance: " << mTermGlobalCostMissTolerance << endl; 
     2385        Debug << "only driving axis: " << mOnlyDrivingAxis << endl; 
     2386        Debug << "max memory: " << mMaxMemory << endl; 
     2387        Debug << "use cost heuristics: " << mUseCostHeuristics << endl; 
     2388        Debug << "subdivision stats log: " << subdivisionStatsLog << endl; 
     2389        Debug << "use random axis: " << mUseRandomAxis << endl; 
     2390        Debug << "priority queue type: " << mNodePriorityQueueType << endl; 
     2391        Debug << "circulating axis: " << mCirculatingAxis << endl; 
     2392        Debug << "minband: " << mMinBand << endl; 
     2393        Debug << "maxband: " << mMaxBand << endl; 
     2394         
     2395 
     2396        mSplitCandidates = new vector<SortableEntry>; 
     2397 
     2398        Debug << endl; 
     2399#endif 
     2400} 
     2401 
     2402 
    23122403 
    23132404void OspTree::SplitObjects(const AxisAlignedPlane & splitPlane, 
Note: See TracChangeset for help on using the changeset viewer.