Changeset 2015 for GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp
- Timestamp:
- 01/22/07 20:25:06 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp
r2003 r2015 268 268 269 269 270 bool VspInterior::IsLeaf() const 271 { 272 return false; 273 } 274 275 276 VspNode *VspInterior::GetBack() 277 { 278 return mBack; 279 } 280 281 282 VspNode *VspInterior::GetFront() 283 { 284 return mFront; 285 } 286 287 288 AxisAlignedPlane VspInterior::GetPlane() const 289 { 290 return mPlane; 291 } 292 293 294 float VspInterior::GetPosition() const 295 { 296 return mPlane.mPosition; 297 } 298 299 300 int VspInterior::GetAxis() const 301 { 302 return mPlane.mAxis; 303 } 270 271 304 272 305 273 … … 388 356 389 357 390 ViewCellLeaf *VspLeaf::GetViewCell() const391 {392 return mViewCell;393 }394 358 395 359 … … 400 364 401 365 402 bool VspLeaf::IsLeaf() const403 {404 return true;405 }406 366 407 367 … … 2376 2336 int axis; 2377 2337 2338 ViewCell::NewMail(); 2339 2378 2340 while (1) 2379 2341 { 2380 2342 if (!node->IsLeaf()) 2381 2343 { 2382 VspInterior *in = dynamic_cast<VspInterior *>(node);2344 VspInterior *in = (VspInterior *)node; 2383 2345 position = in->GetPosition(); 2384 2346 axis = in->GetAxis(); … … 2425 2387 { 2426 2388 // compute intersection with all objects in this leaf 2427 VspLeaf *leaf = dynamic_cast<VspLeaf *>(node);2389 VspLeaf *leaf = (VspLeaf *)node; 2428 2390 ViewCell *viewCell; 2429 if (0) 2430 viewCell = mViewCellsTree->GetActiveViewCell(leaf->GetViewCell()); 2431 else 2432 viewCell = leaf->GetViewCell(); 2433 2391 // if (0) 2392 // viewCell = mViewCellsTree->GetActiveViewCell(leaf->GetViewCell()); 2393 // else 2394 2395 viewCell = leaf->GetViewCell(); 2396 2434 2397 // don't have to mail if each view cell belongs to exactly one leaf 2435 if (!useMailboxing || !viewCell->Mailed()) 2436 { 2437 if (useMailboxing) 2438 viewCell->Mail(); 2439 2440 viewcells.push_back(viewCell); 2441 ++ hits; 2442 } 2443 2398 // $$ JB -> always mailbox so that we have less conditions 2399 if (!viewCell->Mailed()) { 2400 viewCell->Mail(); 2401 2402 viewcells.push_back(viewCell); 2403 ++ hits; 2404 } 2405 2444 2406 // get the next node from the stack 2445 2407 if (tStack.empty()) 2446 2447 2408 break; 2409 2448 2410 entp = extp; 2449 2411 mint = maxt;
Note: See TracChangeset
for help on using the changeset viewer.