Changeset 4904 for nanovis/branches/1.1/Flow.cpp
- Timestamp:
- Dec 22, 2014, 4:18:59 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nanovis/branches/1.1/Flow.cpp
r4893 r4904 9 9 * Leif Delgass <ldelgass@purdue.edu> 10 10 */ 11 12 #include <float.h> 11 13 12 14 #include <tcl.h> … … 31 33 using namespace vrmath; 32 34 35 bool Flow::updatePending = false; 36 33 37 Flow::Flow(Tcl_Interp *interp, const char *name) : 34 38 _interp(interp), … … 81 85 return; 82 86 83 #if 0 // Using volume bounds instead of these84 if (isDataLoaded()) {85 Vector3f umin, umax;86 Rappture::Unirect3d *unirect = data();87 unirect->getWorldSpaceBounds(umin, umax);88 if (min.x > umin.x) {89 min.x = umin.x;90 }91 if (max.x < umax.x) {92 max.x = umax.x;93 }94 if (min.y > umin.y) {95 min.y = umin.y;96 }97 if (max.y < umax.y) {98 max.y = umax.y;99 }100 if (min.z > umin.z) {101 min.z = umin.z;102 }103 if (max.z < umax.z) {104 max.z = umax.z;105 }106 }107 #endif108 87 for (BoxHashmap::iterator itr = _boxTable.begin(); 109 88 itr != _boxTable.end(); ++itr) { … … 155 134 } 156 135 157 float158 Flow::getRelativePosition()159 {160 return getRelativePosition(&_sv.slicePos);161 }162 163 136 void 164 137 Flow::resetParticles() … … 314 287 315 288 Vector3f scale = volume->getPhysicalScaling(); 316 Vector3f location = _volume->location();289 Vector3f pos = _volume->getPosition(); 317 290 318 291 if (NanoVis::licRenderer != NULL) { 319 292 NanoVis::licRenderer-> 320 293 setVectorField(_volume->textureID(), 321 location,294 pos, 322 295 scale.x, 323 296 scale.y, 324 297 scale.z, 325 298 _volume->wAxis.max()); 326 setCurrentPosition();327 setAxis();328 setActive();299 NanoVis::licRenderer->setSliceAxis(_sv.slicePos.axis); 300 NanoVis::licRenderer->setSlicePosition(_sv.slicePos.value); 301 NanoVis::licRenderer->visible(_sv.sliceVisible); 329 302 } 330 303 … … 332 305 NanoVis::velocityArrowsSlice-> 333 306 setVectorField(_volume->textureID(), 334 location,307 pos, 335 308 scale.x, 336 309 scale.y, 337 310 scale.z, 338 311 _volume->wAxis.max()); 339 NanoVis::velocityArrowsSlice-> axis(_sv.slicePos.axis);340 NanoVis::velocityArrowsSlice->s licePos(_sv.slicePos.value);341 NanoVis::velocityArrowsSlice-> enabled(_sv.showArrows);312 NanoVis::velocityArrowsSlice->setSliceAxis(_sv.slicePos.axis); 313 NanoVis::velocityArrowsSlice->setSlicePosition(_sv.slicePos.value); 314 NanoVis::velocityArrowsSlice->visible(_sv.showArrows); 342 315 } 343 316 … … 345 318 itr != _particlesTable.end(); ++itr) { 346 319 itr->second->setVectorField(_volume, 347 location,320 pos, 348 321 scale.x, 349 322 scale.y, … … 433 406 434 407 Vector3f volScaling = volume->getPhysicalScaling(); 435 Vector3f loc(volScaling);436 loc*= -0.5;437 volume-> location(loc);408 Vector3f pos(volScaling); 409 pos *= -0.5; 410 volume->setPosition(pos); 438 411 439 412 Volume::updatePending = true;
Note: See TracChangeset
for help on using the changeset viewer.