- Timestamp:
- Aug 2, 2012 7:22:21 PM (12 years ago)
- Location:
- trunk/packages/vizservers/vtkvis
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/vtkvis/RpVtkRenderer.h
r3133 r3134 444 444 void setMoleculeAtomVisibility(const DataSetId& id, bool state); 445 445 446 void setMoleculeAtomLabelVisibility(const DataSetId& id, bool state); 447 446 448 void setMoleculeBondVisibility(const DataSetId& id, bool state); 447 449 -
trunk/packages/vizservers/vtkvis/RpVtkRendererCmd.cpp
r3126 r3134 3488 3488 3489 3489 static int 3490 MoleculeAtomLabelVisibilityOp(ClientData clientData, Tcl_Interp *interp, int objc, 3491 Tcl_Obj *const *objv) 3492 { 3493 bool state; 3494 if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) { 3495 return TCL_ERROR; 3496 } 3497 if (objc == 4) { 3498 const char *name = Tcl_GetString(objv[3]); 3499 g_renderer->setMoleculeAtomLabelVisibility(name, state); 3500 } else { 3501 g_renderer->setMoleculeAtomLabelVisibility("all", state); 3502 } 3503 return TCL_OK; 3504 } 3505 3506 static int 3490 3507 MoleculeAtomScaleFactorOp(ClientData clientData, Tcl_Interp *interp, int objc, 3491 3508 Tcl_Obj *const *objv) … … 3826 3843 {"delete", 1, MoleculeDeleteOp, 2, 3, "?dataSetName?"}, 3827 3844 {"edges", 1, MoleculeEdgeVisibilityOp, 3, 4, "bool ?dataSetName?"}, 3845 {"labels", 2, MoleculeAtomLabelVisibilityOp, 3, 4, "bool ?dataSetName?"}, 3828 3846 {"lighting", 3, MoleculeLightingOp, 3, 4, "bool ?dataSetName?"}, 3829 3847 {"linecolor", 5, MoleculeLineColorOp, 5, 6, "r g b ?dataSetName?"}, -
trunk/packages/vizservers/vtkvis/RpVtkRendererGraphicsObjs.cpp
r3126 r3134 1173 1173 1174 1174 /** 1175 * \brief Turn on/off rendering of the Molecule atom labels for the given DataSet 1176 */ 1177 void Renderer::setMoleculeAtomLabelVisibility(const DataSetId& id, bool state) 1178 { 1179 MoleculeHashmap::iterator itr; 1180 1181 bool doAll = false; 1182 1183 if (id.compare("all") == 0) { 1184 itr = _molecules.begin(); 1185 doAll = true; 1186 } else { 1187 itr = _molecules.find(id); 1188 } 1189 if (itr == _molecules.end()) { 1190 ERROR("Molecule not found: %s", id.c_str()); 1191 return; 1192 } 1193 1194 do { 1195 itr->second->setAtomLabelVisibility(state); 1196 } while (doAll && ++itr != _molecules.end()); 1197 1198 _needsRedraw = true; 1199 } 1200 1201 /** 1175 1202 * \brief Set radius scale factor for atoms 1176 1203 */ -
trunk/packages/vizservers/vtkvis/protocol.txt
r3126 r3134 288 288 molecule delete <?datasetName?> 289 289 molecule edges <bool> <?datasetName?> 290 molecule labels <bool> <?datasetName?> 290 291 molecule lighting <bool> <?datasetName?> 291 292 molecule linecolor <r> <g> <b> <?datasetName?>
Note: See TracChangeset
for help on using the changeset viewer.