Changeset 3138 for trunk/packages
- Timestamp:
- Aug 8, 2012, 10:13:25 AM (12 years ago)
- Location:
- trunk/packages/vizservers/vtkvis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/vtkvis/RpVtkRenderer.cpp
r3136 r3138 2298 2298 if ((!onlyVisible || itr->second->getVisibility()) && 2299 2299 itr->second->getProp() != NULL) 2300 mergeBounds(bounds, bounds, itr->second->get Prop()->GetBounds());2300 mergeBounds(bounds, bounds, itr->second->getBounds()); 2301 2301 } 2302 2302 for (Contour3DHashmap::iterator itr = _contour3Ds.begin(); … … 2304 2304 if ((!onlyVisible || itr->second->getVisibility()) && 2305 2305 itr->second->getProp() != NULL) 2306 mergeBounds(bounds, bounds, itr->second->get Prop()->GetBounds());2306 mergeBounds(bounds, bounds, itr->second->getBounds()); 2307 2307 } 2308 2308 for (CutplaneHashmap::iterator itr = _cutplanes.begin(); … … 2310 2310 if ((!onlyVisible || itr->second->getVisibility()) && 2311 2311 itr->second->getProp() != NULL) 2312 mergeBounds(bounds, bounds, itr->second->get Prop()->GetBounds());2312 mergeBounds(bounds, bounds, itr->second->getBounds()); 2313 2313 } 2314 2314 for (GlyphsHashmap::iterator itr = _glyphs.begin(); … … 2316 2316 if ((!onlyVisible || itr->second->getVisibility()) && 2317 2317 itr->second->getProp() != NULL) 2318 mergeBounds(bounds, bounds, itr->second->get Prop()->GetBounds());2318 mergeBounds(bounds, bounds, itr->second->getBounds()); 2319 2319 } 2320 2320 for (HeightMapHashmap::iterator itr = _heightMaps.begin(); … … 2322 2322 if ((!onlyVisible || itr->second->getVisibility()) && 2323 2323 itr->second->getProp() != NULL) 2324 mergeBounds(bounds, bounds, itr->second->get Prop()->GetBounds());2324 mergeBounds(bounds, bounds, itr->second->getBounds()); 2325 2325 } 2326 2326 for (LICHashmap::iterator itr = _lics.begin(); … … 2328 2328 if ((!onlyVisible || itr->second->getVisibility()) && 2329 2329 itr->second->getProp() != NULL) 2330 mergeBounds(bounds, bounds, itr->second->get Prop()->GetBounds());2330 mergeBounds(bounds, bounds, itr->second->getBounds()); 2331 2331 } 2332 2332 for (MoleculeHashmap::iterator itr = _molecules.begin(); … … 2334 2334 if ((!onlyVisible || itr->second->getVisibility()) && 2335 2335 itr->second->getProp() != NULL) 2336 mergeBounds(bounds, bounds, itr->second->get Prop()->GetBounds());2336 mergeBounds(bounds, bounds, itr->second->getBounds()); 2337 2337 } 2338 2338 for (PolyDataHashmap::iterator itr = _polyDatas.begin(); … … 2340 2340 if ((!onlyVisible || itr->second->getVisibility()) && 2341 2341 itr->second->getProp() != NULL) 2342 mergeBounds(bounds, bounds, itr->second->get Prop()->GetBounds());2342 mergeBounds(bounds, bounds, itr->second->getBounds()); 2343 2343 } 2344 2344 for (PseudoColorHashmap::iterator itr = _pseudoColors.begin(); … … 2346 2346 if ((!onlyVisible || itr->second->getVisibility()) && 2347 2347 itr->second->getProp() != NULL) 2348 mergeBounds(bounds, bounds, itr->second->get Prop()->GetBounds());2348 mergeBounds(bounds, bounds, itr->second->getBounds()); 2349 2349 } 2350 2350 for (StreamlinesHashmap::iterator itr = _streamlines.begin(); … … 2352 2352 if ((!onlyVisible || itr->second->getVisibility()) && 2353 2353 itr->second->getProp() != NULL) 2354 mergeBounds(bounds, bounds, itr->second->get Prop()->GetBounds());2354 mergeBounds(bounds, bounds, itr->second->getBounds()); 2355 2355 } 2356 2356 for (VolumeHashmap::iterator itr = _volumes.begin(); … … 2358 2358 if ((!onlyVisible || itr->second->getVisibility()) && 2359 2359 itr->second->getProp() != NULL) 2360 mergeBounds(bounds, bounds, itr->second->get Prop()->GetBounds());2360 mergeBounds(bounds, bounds, itr->second->getBounds()); 2361 2361 } 2362 2362 for (WarpHashmap::iterator itr = _warps.begin(); … … 2364 2364 if ((!onlyVisible || itr->second->getVisibility()) && 2365 2365 itr->second->getProp() != NULL) 2366 mergeBounds(bounds, bounds, itr->second->getBounds()); 2367 } 2368 2369 for (int i = 0; i < 6; i += 2) { 2370 if (bounds[i+1] < bounds[i]) { 2371 bounds[i] = -0.5; 2372 bounds[i+1] = 0.5; 2373 } 2374 } 2375 2376 int numDims = 0; 2377 if (bounds[0] != bounds[1]) 2378 numDims++; 2379 if (bounds[2] != bounds[3]) 2380 numDims++; 2381 if (bounds[4] != bounds[5]) 2382 numDims++; 2383 2384 if (numDims == 0) { 2385 bounds[0] -= .5; 2386 bounds[1] += .5; 2387 bounds[2] -= .5; 2388 bounds[3] += .5; 2389 } 2390 2391 TRACE("Bounds: %g %g %g %g %g %g", 2392 bounds[0], 2393 bounds[1], 2394 bounds[2], 2395 bounds[3], 2396 bounds[4], 2397 bounds[5]); 2398 } 2399 2400 /** 2401 * \brief Collect bounds of all graphics objects 2402 * 2403 * \param[out] bounds Bounds of all scene objects 2404 * \param[in] onlyVisible Only collect bounds of visible objects 2405 */ 2406 void Renderer::collectUnscaledBounds(double *bounds, bool onlyVisible) 2407 { 2408 bounds[0] = DBL_MAX; 2409 bounds[1] = -DBL_MAX; 2410 bounds[2] = DBL_MAX; 2411 bounds[3] = -DBL_MAX; 2412 bounds[4] = DBL_MAX; 2413 bounds[5] = -DBL_MAX; 2414 2415 for (DataSetHashmap::iterator itr = _dataSets.begin(); 2416 itr != _dataSets.end(); ++itr) { 2417 if ((!onlyVisible || itr->second->getVisibility()) && 2418 itr->second->getProp() != NULL) 2366 2419 mergeBounds(bounds, bounds, itr->second->getProp()->GetBounds()); 2420 } 2421 for (Contour2DHashmap::iterator itr = _contour2Ds.begin(); 2422 itr != _contour2Ds.end(); ++itr) { 2423 if ((!onlyVisible || itr->second->getVisibility()) && 2424 itr->second->getProp() != NULL) 2425 mergeBounds(bounds, bounds, itr->second->getUnscaledBounds()); 2426 } 2427 for (Contour3DHashmap::iterator itr = _contour3Ds.begin(); 2428 itr != _contour3Ds.end(); ++itr) { 2429 if ((!onlyVisible || itr->second->getVisibility()) && 2430 itr->second->getProp() != NULL) 2431 mergeBounds(bounds, bounds, itr->second->getUnscaledBounds()); 2432 } 2433 for (CutplaneHashmap::iterator itr = _cutplanes.begin(); 2434 itr != _cutplanes.end(); ++itr) { 2435 if ((!onlyVisible || itr->second->getVisibility()) && 2436 itr->second->getProp() != NULL) 2437 mergeBounds(bounds, bounds, itr->second->getUnscaledBounds()); 2438 } 2439 for (GlyphsHashmap::iterator itr = _glyphs.begin(); 2440 itr != _glyphs.end(); ++itr) { 2441 if ((!onlyVisible || itr->second->getVisibility()) && 2442 itr->second->getProp() != NULL) 2443 mergeBounds(bounds, bounds, itr->second->getUnscaledBounds()); 2444 } 2445 for (HeightMapHashmap::iterator itr = _heightMaps.begin(); 2446 itr != _heightMaps.end(); ++itr) { 2447 if ((!onlyVisible || itr->second->getVisibility()) && 2448 itr->second->getProp() != NULL) 2449 mergeBounds(bounds, bounds, itr->second->getUnscaledBounds()); 2450 } 2451 for (LICHashmap::iterator itr = _lics.begin(); 2452 itr != _lics.end(); ++itr) { 2453 if ((!onlyVisible || itr->second->getVisibility()) && 2454 itr->second->getProp() != NULL) 2455 mergeBounds(bounds, bounds, itr->second->getUnscaledBounds()); 2456 } 2457 for (MoleculeHashmap::iterator itr = _molecules.begin(); 2458 itr != _molecules.end(); ++itr) { 2459 if ((!onlyVisible || itr->second->getVisibility()) && 2460 itr->second->getProp() != NULL) 2461 mergeBounds(bounds, bounds, itr->second->getUnscaledBounds()); 2462 } 2463 for (PolyDataHashmap::iterator itr = _polyDatas.begin(); 2464 itr != _polyDatas.end(); ++itr) { 2465 if ((!onlyVisible || itr->second->getVisibility()) && 2466 itr->second->getProp() != NULL) 2467 mergeBounds(bounds, bounds, itr->second->getUnscaledBounds()); 2468 } 2469 for (PseudoColorHashmap::iterator itr = _pseudoColors.begin(); 2470 itr != _pseudoColors.end(); ++itr) { 2471 if ((!onlyVisible || itr->second->getVisibility()) && 2472 itr->second->getProp() != NULL) 2473 mergeBounds(bounds, bounds, itr->second->getUnscaledBounds()); 2474 } 2475 for (StreamlinesHashmap::iterator itr = _streamlines.begin(); 2476 itr != _streamlines.end(); ++itr) { 2477 if ((!onlyVisible || itr->second->getVisibility()) && 2478 itr->second->getProp() != NULL) 2479 mergeBounds(bounds, bounds, itr->second->getUnscaledBounds()); 2480 } 2481 for (VolumeHashmap::iterator itr = _volumes.begin(); 2482 itr != _volumes.end(); ++itr) { 2483 if ((!onlyVisible || itr->second->getVisibility()) && 2484 itr->second->getProp() != NULL) 2485 mergeBounds(bounds, bounds, itr->second->getUnscaledBounds()); 2486 } 2487 for (WarpHashmap::iterator itr = _warps.begin(); 2488 itr != _warps.end(); ++itr) { 2489 if ((!onlyVisible || itr->second->getVisibility()) && 2490 itr->second->getProp() != NULL) 2491 mergeBounds(bounds, bounds, itr->second->getUnscaledBounds()); 2367 2492 } 2368 2493 -
trunk/packages/vizservers/vtkvis/RpVtkRenderer.h
r3134 r3138 554 554 void collectBounds(double *bounds, bool onlyVisible); 555 555 556 void collectUnscaledBounds(double *bounds, bool onlyVisible); 557 556 558 void collectDataRanges(); 557 559
Note: See TracChangeset
for help on using the changeset viewer.