Ignore:
Timestamp:
Aug 22, 2013, 7:30:02 PM (11 years ago)
Author:
ldelgass
Message:

Add cutplane visibility flag to nanovis. Will be used to add cutplanes button
in client

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/Command.cpp

    r3870 r3883  
    766766}
    767767
     768static int
     769CutplaneVisibleOp(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
    768788static Rappture::CmdSpec cutplaneOps[] = {
    769789    {"position", 1, CutplanePositionOp, 4, 0, "relval axis ?indices?",},
    770790    {"state",    1, CutplaneStateOp,    4, 0, "bool axis ?indices?",},
     791    {"visible",  1, CutplaneVisibleOp,  3, 0, "bool ?indices?",},
    771792};
    772793static int nCutplaneOps = NumCmdSpecs(cutplaneOps);
Note: See TracChangeset for help on using the changeset viewer.