Changeset 566 for trunk/VUT/GtpVisibilityPreprocessor/src
- Timestamp:
- 01/23/06 03:34:48 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.cpp
r564 r566 273 273 AxisAlignedBox3 *forcedBoundingBox) 274 274 { 275 275 mStat.nodes = 1; 276 276 mBox.Initialize(); // initialise BSP tree bounding box 277 277 … … 2640 2640 mMergeQueue.push(mc); 2641 2641 ++ candidates; 2642 if ((candidates % 1000) == 0) 2643 { 2644 cout << "collected " << candidates << " merge candidates" << endl; 2645 } 2642 2646 } 2643 2647 } … … 3121 3125 3122 3126 // HACK for visualization 3123 ViewCellContainer viewCells;3127 /*ViewCellContainer viewCells; 3124 3128 ViewCell::NewMail(); 3125 3129 CollectViewCells(mRoot, true, viewCells, true); 3126 3130 for (int i = 0; i < viewCells.size(); ++i) 3127 3131 viewCells[i]->SetId((int)RandomValue(0, Real(256*256*256))); 3128 3132 */ 3129 3133 Material m; 3130 3134 m.mDiffuseColor.r = 0; … … 3138 3142 mMergeQueue.pop(); 3139 3143 3144 3145 // visualize neighbors 3140 3146 m = RandomMaterial(); 3141 // visualize neighbors3142 3147 exporter->SetForcedMaterial(m); 3143 3148 … … 3151 3156 //m.mDiffuseColor.b = ((mc.GetLeaf1()->GetViewCell()->GetId()>>16) & 256)/ 255.0f; 3152 3157 exporter->SetForcedMaterial(m); 3153 3154 3158 exporter->ExportPolygons(geom1.mPolys); 3155 3159 … … 3158 3162 //m.mDiffuseColor.b = ((mc.GetLeaf2()->GetViewCell()->GetId()>>16) & 256)/ 255.0f; 3159 3163 //exporter->SetForcedMaterial(m); 3160 3161 3164 exporter->ExportPolygons(geom2.mPolys); 3162 3165 } … … 3239 3242 const int pvs2 = AddedPvsSize(vc2->GetPvs(), *leaf->mPvs); 3240 3243 3244 // dont' shuffle leaves with pvs > max 3241 3245 if (pvs1 + pvs2 > mViewCellsManager->GetMaxPvsSize()) 3242 3246 return 1e15f; … … 3255 3259 } 3256 3260 3257 const float cost1 = pvs1 * p1;3258 const float cost2 = pvs2 * p2;3261 const float cost1 = (float)pvs1 * p1; 3262 const float cost2 = (float)pvs2 * p2; 3259 3263 3260 3264 return cost1 + cost2;
Note: See TracChangeset
for help on using the changeset viewer.