Changeset 3883
- Timestamp:
- Aug 22, 2013, 7:30:02 PM (11 years ago)
- Location:
- trunk/packages/vizservers/nanovis
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanovis/Command.cpp
r3870 r3883 766 766 } 767 767 768 static int 769 CutplaneVisibleOp(ClientData clientData, Tcl_Interp *interp, int objc, 770 Tcl_Obj *const *objv) 771 { 772 bool state; 773 if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) { 774 return TCL_ERROR; 775 } 776 777 std::vector<Volume *> ivol; 778 if (GetVolumes(interp, objc - 4, objv + 4, &ivol) != TCL_OK) { 779 return TCL_ERROR; 780 } 781 std::vector<Volume *>::iterator iter; 782 for (iter = ivol.begin(); iter != ivol.end(); iter++) { 783 (*iter)->cutplanesVisible(state); 784 } 785 return TCL_OK; 786 } 787 768 788 static Rappture::CmdSpec cutplaneOps[] = { 769 789 {"position", 1, CutplanePositionOp, 4, 0, "relval axis ?indices?",}, 770 790 {"state", 1, CutplaneStateOp, 4, 0, "bool axis ?indices?",}, 791 {"visible", 1, CutplaneVisibleOp, 3, 0, "bool ?indices?",}, 771 792 }; 772 793 static int nCutplaneOps = NumCmdSpecs(cutplaneOps); -
trunk/packages/vizservers/nanovis/Volume.cpp
r3630 r3883 48 48 _numComponents(n), 49 49 _nonZeroMin(nonZeroMin), 50 _cutplanesVisible(true), 50 51 _tex(NULL), 51 52 _position(0,0,0), -
trunk/packages/vizservers/nanovis/Volume.h
r3630 r3883 155 155 void disableCutplane(int index); 156 156 157 void cutplanesVisible(bool state) 158 { 159 _cutplanesVisible = state; 160 } 161 162 bool cutplanesVisible() const 163 { 164 return _cutplanesVisible; 165 } 166 157 167 void setCutplanePosition(int index, float location); 158 168 … … 387 397 double _nonZeroMin; 388 398 399 bool _cutplanesVisible; 389 400 std::vector<CutPlane> _plane; ///< cut planes 390 401 -
trunk/packages/vizservers/nanovis/VolumeRenderer.cpp
r3630 r3883 281 281 282 282 for (int j = 0; j < volume->getCutplaneCount(); j++) { 283 if (!volume-> isCutplaneEnabled(j)) {283 if (!volume->cutplanesVisible() || !volume->isCutplaneEnabled(j)) { 284 284 continue; 285 285 }
Note: See TracChangeset
for help on using the changeset viewer.