Changeset 3092 for trunk/packages/vizservers
- Timestamp:
- Jul 14, 2012 1:47:06 PM (12 years ago)
- Location:
- trunk/packages/vizservers/vtkvis
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/vtkvis/RpGlyphs.cpp
r2641 r3092 638 638 639 639 /** 640 * \brief Turn on/off orienting glyphs from a vector field 641 */ 642 void Glyphs::setOrient(bool state) 643 { 644 #ifdef HAVE_GLYPH3D_MAPPER 645 if (_glyphMapper != NULL) { 646 _glyphMapper->SetOrient(state ? 1 : 0); 647 } 648 #else 649 if (_glyphGenerator != NULL) { 650 _glyphGenerator->SetOrient(state ? 1 : 0); 651 } 652 #endif 653 } 654 655 /** 640 656 * \brief Controls relative scaling of glyphs 641 657 */ -
trunk/packages/vizservers/vtkvis/RpGlyphs.h
r2641 r3092 77 77 virtual void setClippingPlanes(vtkPlaneCollection *planes); 78 78 79 void setOrient(bool state); 80 79 81 #ifdef HAVE_GLYPH3D_MAPPER 80 82 void setScalingMode(ScalingMode mode, const char *name, double range[2]); -
trunk/packages/vizservers/vtkvis/RpVtkGraphicsObject.h
r2771 r3092 658 658 if (getActor() != NULL) { 659 659 setCulling(getActor()->GetProperty(), state); 660 660 } else if (getAssembly() != NULL) { 661 661 vtkProp3DCollection *props = getAssembly()->GetParts(); 662 662 vtkProp3D *prop; -
trunk/packages/vizservers/vtkvis/RpVtkRenderer.h
r2866 r3092 393 393 394 394 void setGlyphsShape(const DataSetId& id, Glyphs::GlyphShape shape); 395 396 void setGlyphsOrient(const DataSetId& id, bool state); 395 397 396 398 void setGlyphsColorMode(const DataSetId& id, -
trunk/packages/vizservers/vtkvis/RpVtkRendererCmd.cpp
r2757 r3092 2361 2361 2362 2362 static int 2363 GlyphsOrientGlyphsOp(ClientData clientData, Tcl_Interp *interp, int objc, 2364 Tcl_Obj *const *objv) 2365 { 2366 bool state; 2367 if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) { 2368 return TCL_ERROR; 2369 } 2370 if (objc == 4) { 2371 const char *name = Tcl_GetString(objv[3]); 2372 g_renderer->setGlyphsOrient(name, state); 2373 } else { 2374 g_renderer->setGlyphsOrient("all", state); 2375 } 2376 return TCL_OK; 2377 } 2378 2379 static int 2363 2380 GlyphsPositionOp(ClientData clientData, Tcl_Interp *interp, int objc, 2364 2381 Tcl_Obj *const *objv) … … 2527 2544 {"delete", 1, GlyphsDeleteOp, 2, 3, "?dataSetName?"}, 2528 2545 {"edges", 1, GlyphsEdgeVisibilityOp, 3, 4, "bool ?dataSetName?"}, 2529 {"gscale", 1, GlyphsScaleFactorOp, 3, 4, "scaleFactor ?dataSetName?"}, 2546 {"gorient", 2, GlyphsOrientGlyphsOp, 3, 4, "bool ?dataSetName?"}, 2547 {"gscale", 2, GlyphsScaleFactorOp, 3, 4, "scaleFactor ?dataSetName?"}, 2530 2548 {"lighting", 3, GlyphsLightingOp, 3, 4, "bool ?dataSetName?"}, 2531 2549 {"linecolor", 5, GlyphsLineColorOp, 5, 6, "r g b ?dataSetName?"}, -
trunk/packages/vizservers/vtkvis/RpVtkRendererGraphicsObjs.cpp
r2757 r3092 698 698 699 699 /** 700 * \brief Controls if glyphs are oriented from a vector field for the 701 * given DataSet 702 */ 703 void Renderer::setGlyphsOrient(const DataSetId& id, bool state) 704 { 705 GlyphsHashmap::iterator itr; 706 707 bool doAll = false; 708 709 if (id.compare("all") == 0) { 710 itr = _glyphs.begin(); 711 doAll = true; 712 } else { 713 itr = _glyphs.find(id); 714 } 715 if (itr == _glyphs.end()) { 716 ERROR("Glyphs not found: %s", id.c_str()); 717 return; 718 } 719 720 do { 721 itr->second->setOrient(state); 722 } while (doAll && ++itr != _glyphs.end()); 723 724 _renderer->ResetCameraClippingRange(); 725 _needsRedraw = true; 726 } 727 728 /** 700 729 * \brief Set the shape of Glyphs for the given DataSet 701 730 */ -
trunk/packages/vizservers/vtkvis/protocol.txt
r3085 r3092 204 204 glyphs delete <?dataSetName?> 205 205 glyphs edges <bool> <?datasetName?> 206 glyphs gorient <bool> <?datasetName?> 206 207 glyphs gscale <scaleFactor> <?datasetName?> 207 208 Set glyph scaling factor
Note: See TracChangeset
for help on using the changeset viewer.