Changeset 3615
- Timestamp:
- Apr 3, 2013, 12:34:50 AM (12 years ago)
- Location:
- trunk/packages/vizservers/vtkvis
- Files:
-
- 77 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/vtkvis/CmdProc.h
r3177 r3615 6 6 */ 7 7 8 #ifndef __CMDPROC_H__9 #define __CMDPROC_H__8 #ifndef RAPPTURE_CMDPROC_H 9 #define RAPPTURE_CMDPROC_H 10 10 11 11 #include <tcl.h> -
trunk/packages/vizservers/vtkvis/ColorMap.cpp
r3457 r3615 18 18 #include "Trace.h" 19 19 20 using namespace Rappture::VtkVis;20 using namespace VtkVis; 21 21 22 22 ColorMap *ColorMap::_default = NULL; -
trunk/packages/vizservers/vtkvis/ColorMap.h
r3455 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_COLORMAP_H__9 #define __RAPPTURE_VTKVIS_COLORMAP_H__8 #ifndef VTKVIS_COLORMAP_H 9 #define VTKVIS_COLORMAP_H 10 10 11 11 #include <string> … … 17 17 #include <vtkLookupTable.h> 18 18 19 namespace Rappture {20 19 namespace VtkVis { 21 20 … … 132 131 133 132 } 134 }135 133 136 134 #endif -
trunk/packages/vizservers/vtkvis/PPMWriter.cpp
r3177 r3615 18 18 #endif 19 19 20 using namespace Rappture::VtkVis;20 using namespace VtkVis; 21 21 22 22 #ifdef USE_THREADS … … 44 44 */ 45 45 void 46 Rappture::VtkVis::queuePPM(ResponseQueue *queue, const char *cmdName,47 46 VtkVis::queuePPM(ResponseQueue *queue, const char *cmdName, 47 const unsigned char *data, int width, int height) 48 48 { 49 49 #define PPM_MAXVAL 255 … … 121 121 */ 122 122 void 123 Rappture::VtkVis::writePPM(int fd, const char *cmdName,124 123 VtkVis::writePPM(int fd, const char *cmdName, 124 const unsigned char *data, int width, int height) 125 125 { 126 126 #define PPM_MAXVAL 255 -
trunk/packages/vizservers/vtkvis/PPMWriter.h
r3177 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_PPMWRITER_H__9 #define __RAPPTURE_VTKVIS_PPMWRITER_H__8 #ifndef VTKVIS_PPMWRITER_H 9 #define VTKVIS_PPMWRITER_H 10 10 11 11 #ifdef USE_THREADS … … 13 13 #endif 14 14 15 namespace Rappture {16 15 namespace VtkVis { 17 16 #ifdef USE_THREADS … … 25 24 #endif 26 25 } 27 }28 26 #endif -
trunk/packages/vizservers/vtkvis/ReadBuffer.cpp
r3177 r3615 15 15 #include "Trace.h" 16 16 17 using namespace Rappture::VtkVis;17 using namespace VtkVis; 18 18 19 19 /** -
trunk/packages/vizservers/vtkvis/ReadBuffer.h
r3177 r3615 8 8 #include <cstdlib> 9 9 10 #ifndef _READBUFFER_H11 #define _READBUFFER_H10 #ifndef VTKVIS_READBUFFER_H 11 #define VTKVIS_READBUFFER_H 12 12 13 namespace Rappture {14 13 namespace VtkVis { 15 14 … … 82 81 83 82 } 84 }85 83 86 #endif /* _READBUFFER_H */84 #endif -
trunk/packages/vizservers/vtkvis/ResponseQueue.cpp
r3330 r3615 16 16 #include "ResponseQueue.h" 17 17 18 using namespace Rappture::VtkVis;18 using namespace VtkVis; 19 19 20 ResponseQueue::ResponseQueue(void *clientData) : 21 _clientData(clientData) 20 ResponseQueue::ResponseQueue() 22 21 { 23 22 pthread_mutex_init(&_idle, NULL); -
trunk/packages/vizservers/vtkvis/ResponseQueue.h
r3451 r3615 5 5 * Author: George A. Howlett <gah@purdue.edu> 6 6 */ 7 #ifndef VTKVIS_RESPONSE_QUEUE_H 8 #define VTKVIS_RESPONSE_QUEUE_H 7 9 8 10 #include <pthread.h> 9 11 #include <semaphore.h> 10 12 #include <cstdlib> 13 #include <cstring> 11 14 #include <list> 12 15 13 #ifndef _RESPONSE_QUEUE_H14 #define _RESPONSE_QUEUE_H15 16 namespace Rappture {17 16 namespace VtkVis { 18 17 … … 111 110 { 112 111 public: 113 ResponseQueue( void *clientData);112 ResponseQueue(); 114 113 115 114 virtual ~ResponseQueue(); 116 117 /// A place to store a data pointer. Not used internally.118 /* XXX: This probably doesn't belong here */119 void *clientData()120 {121 return _clientData;122 }123 115 124 116 /// Add a response to the end of the queue … … 132 124 sem_t _ready; /**< Semaphore indicating that a response has been queued. */ 133 125 std::list<Response *> _list; 134 void *_clientData;135 126 }; 136 127 137 128 } 138 }139 129 140 130 #endif -
trunk/packages/vizservers/vtkvis/RpArc.cpp
r3177 r3615 13 13 #include "Trace.h" 14 14 15 using namespace Rappture::VtkVis;15 using namespace VtkVis; 16 16 17 17 Arc::Arc() : -
trunk/packages/vizservers/vtkvis/RpArc.h
r3177 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_ARC_H__9 #define __RAPPTURE_VTKVIS_ARC_H__8 #ifndef VTKVIS_ARC_H 9 #define VTKVIS_ARC_H 10 10 11 11 #include <vtkSmartPointer.h> … … 17 17 #include "RpVtkDataSet.h" 18 18 19 namespace Rappture {20 19 namespace VtkVis { 21 20 … … 65 64 66 65 } 67 }68 66 69 67 #endif -
trunk/packages/vizservers/vtkvis/RpArrow.cpp
r3177 r3615 13 13 #include "Trace.h" 14 14 15 using namespace Rappture::VtkVis;15 using namespace VtkVis; 16 16 17 17 Arrow::Arrow() : -
trunk/packages/vizservers/vtkvis/RpArrow.h
r3177 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_ARROW_H__9 #define __RAPPTURE_VTKVIS_ARROW_H__8 #ifndef VTKVIS_ARROW_H 9 #define VTKVIS_ARROW_H 10 10 11 11 #include <vtkSmartPointer.h> … … 17 17 #include "RpVtkDataSet.h" 18 18 19 namespace Rappture {20 19 namespace VtkVis { 21 20 … … 73 72 74 73 } 75 }76 74 77 75 #endif -
trunk/packages/vizservers/vtkvis/RpBox.cpp
r3177 r3615 19 19 #include "Trace.h" 20 20 21 using namespace Rappture::VtkVis;21 using namespace VtkVis; 22 22 23 23 Box::Box() : -
trunk/packages/vizservers/vtkvis/RpBox.h
r3177 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_BOX_H__9 #define __RAPPTURE_VTKVIS_BOX_H__8 #ifndef VTKVIS_BOX_H 9 #define VTKVIS_BOX_H 10 10 11 11 #include <vtkSmartPointer.h> … … 17 17 #include "RpVtkDataSet.h" 18 18 19 namespace Rappture {20 19 namespace VtkVis { 21 20 … … 52 51 53 52 } 54 }55 53 56 54 #endif -
trunk/packages/vizservers/vtkvis/RpCone.cpp
r3177 r3615 13 13 #include "Trace.h" 14 14 15 using namespace Rappture::VtkVis;15 using namespace VtkVis; 16 16 17 17 Cone::Cone() : -
trunk/packages/vizservers/vtkvis/RpCone.h
r3177 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_CONE_H__9 #define __RAPPTURE_VTKVIS_CONE_H__8 #ifndef VTKVIS_CONE_H 9 #define VTKVIS_CONE_H 10 10 11 11 #include <vtkSmartPointer.h> … … 17 17 #include "RpVtkDataSet.h" 18 18 19 namespace Rappture {20 19 namespace VtkVis { 21 20 … … 85 84 86 85 } 87 }88 86 89 87 #endif -
trunk/packages/vizservers/vtkvis/RpContour2D.cpp
r3525 r3615 27 27 #include "Trace.h" 28 28 29 using namespace Rappture::VtkVis;29 using namespace VtkVis; 30 30 31 31 Contour2D::Contour2D(int numContours) : … … 302 302 } 303 303 304 void Contour2D::setContourField(const char *name) 305 { 306 if (_contourFilter != NULL) { 307 _contourFilter->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, name); 308 update(); 309 } 310 } 311 304 312 void Contour2D::setColorMode(ColorMode mode) 305 313 { -
trunk/packages/vizservers/vtkvis/RpContour2D.h
r3490 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_CONTOUR2D_H__9 #define __RAPPTURE_VTKVIS_CONTOUR2D_H__8 #ifndef VTKVIS_CONTOUR2D_H 9 #define VTKVIS_CONTOUR2D_H 10 10 11 11 #include <vtkSmartPointer.h> … … 21 21 #include "RpVtkGraphicsObject.h" 22 22 23 namespace Rappture {24 23 namespace VtkVis { 25 24 … … 53 52 54 53 virtual void setClippingPlanes(vtkPlaneCollection *planes); 54 55 void setContourField(const char *name); 55 56 56 57 void setNumContours(int numContours); … … 120 121 121 122 } 122 }123 123 124 124 #endif -
trunk/packages/vizservers/vtkvis/RpContour3D.cpp
r3525 r3615 25 25 #include "Trace.h" 26 26 27 using namespace Rappture::VtkVis;27 using namespace VtkVis; 28 28 29 29 Contour3D::Contour3D(int numContours) : … … 269 269 } 270 270 271 void Contour3D::setContourField(const char *name) 272 { 273 if (_contourFilter != NULL) { 274 _contourFilter->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, name); 275 update(); 276 } 277 } 278 271 279 void Contour3D::setColorMode(ColorMode mode) 272 280 { -
trunk/packages/vizservers/vtkvis/RpContour3D.h
r3490 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_CONTOUR3D_H__9 #define __RAPPTURE_VTKVIS_CONTOUR3D_H__8 #ifndef VTKVIS_CONTOUR3D_H 9 #define VTKVIS_CONTOUR3D_H 10 10 11 11 #include <vtkSmartPointer.h> … … 22 22 #include "RpVtkGraphicsObject.h" 23 23 24 namespace Rappture {25 24 namespace VtkVis { 26 25 … … 62 61 63 62 const std::vector<double>& getContourList() const; 63 64 void setContourField(const char *name); 64 65 65 66 void setColorMode(ColorMode mode, DataSet::DataAttributeType type, … … 111 112 112 113 } 113 }114 114 115 115 #endif -
trunk/packages/vizservers/vtkvis/RpCutplane.cpp
r3542 r3615 32 32 #define MESH_POINT_CLOUDS 33 33 34 using namespace Rappture::VtkVis;34 using namespace VtkVis; 35 35 36 36 Cutplane::Cutplane() : -
trunk/packages/vizservers/vtkvis/RpCutplane.h
r3499 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_CUTPLANE_H__9 #define __RAPPTURE_VTKVIS_CUTPLANE_H__8 #ifndef VTKVIS_CUTPLANE_H 9 #define VTKVIS_CUTPLANE_H 10 10 11 11 #include <vtkSmartPointer.h> … … 24 24 #include "RpVtkGraphicsObject.h" 25 25 26 namespace Rappture {27 26 namespace VtkVis { 28 27 … … 124 123 125 124 } 126 }127 125 128 126 #endif -
trunk/packages/vizservers/vtkvis/RpCylinder.cpp
r3177 r3615 13 13 #include "Trace.h" 14 14 15 using namespace Rappture::VtkVis;15 using namespace VtkVis; 16 16 17 17 Cylinder::Cylinder() : -
trunk/packages/vizservers/vtkvis/RpCylinder.h
r3177 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_CYLINDER_H__9 #define __RAPPTURE_VTKVIS_CYLINDER_H__8 #ifndef VTKVIS_CYLINDER_H 9 #define VTKVIS_CYLINDER_H 10 10 11 11 #include <vtkSmartPointer.h> … … 17 17 #include "RpVtkDataSet.h" 18 18 19 namespace Rappture {20 19 namespace VtkVis { 21 20 … … 78 77 79 78 } 80 }81 79 82 80 #endif -
trunk/packages/vizservers/vtkvis/RpDisk.cpp
r3177 r3615 13 13 #include "Trace.h" 14 14 15 using namespace Rappture::VtkVis;15 using namespace VtkVis; 16 16 17 17 Disk::Disk() : -
trunk/packages/vizservers/vtkvis/RpDisk.h
r3177 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_DISK_H__9 #define __RAPPTURE_VTKVIS_DISK_H__8 #ifndef VTKVIS_DISK_H 9 #define VTKVIS_DISK_H 10 10 11 11 #include <vtkSmartPointer.h> … … 17 17 #include "RpVtkDataSet.h" 18 18 19 namespace Rappture {20 19 namespace VtkVis { 21 20 … … 59 58 60 59 } 61 }62 60 63 61 #endif -
trunk/packages/vizservers/vtkvis/RpGlyphs.cpp
r3330 r3615 31 31 #include "Trace.h" 32 32 33 using namespace Rappture::VtkVis;33 using namespace VtkVis; 34 34 35 35 Glyphs::Glyphs(GlyphShape shape) : -
trunk/packages/vizservers/vtkvis/RpGlyphs.h
r3195 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_GLYPHS_H__9 #define __RAPPTURE_VTKVIS_GLYPHS_H__8 #ifndef VTKVIS_GLYPHS_H 9 #define VTKVIS_GLYPHS_H 10 10 11 11 #include <vector> … … 22 22 #include "ColorMap.h" 23 23 24 namespace Rappture {25 24 namespace VtkVis { 26 25 … … 139 138 140 139 } 141 }142 140 143 141 #endif -
trunk/packages/vizservers/vtkvis/RpGroup.cpp
r3177 r3615 9 9 #include "Trace.h" 10 10 11 using namespace Rappture::VtkVis;11 using namespace VtkVis; 12 12 13 13 Group::Group() -
trunk/packages/vizservers/vtkvis/RpGroup.h
r3177 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_GROUP_H__9 #define __RAPPTURE_VTKVIS_GROUP_H__8 #ifndef VTKVIS_GROUP_H 9 #define VTKVIS_GROUP_H 10 10 11 11 #include <tr1/unordered_map> … … 15 15 #include "RpVtkGraphicsObject.h" 16 16 17 namespace Rappture {18 17 namespace VtkVis { 19 18 … … 66 65 67 66 } 68 }69 67 70 68 #endif -
trunk/packages/vizservers/vtkvis/RpHeightMap.cpp
r3542 r3615 35 35 #include "Trace.h" 36 36 37 using namespace Rappture::VtkVis;37 using namespace VtkVis; 38 38 39 39 #define MESH_POINT_CLOUDS 40 #define TRANSLATE_TO_ZORIGIN 40 41 41 42 HeightMap::HeightMap(int numContours, double heightScale) : … … 516 517 _warp->SetScaleFactor(_warpScale * _dataScale); 517 518 } 518 519 #ifdef TRANSLATE_TO_ZORIGIN 520 double pos[3]; 521 pos[0] = 0; 522 pos[1] = 0; 523 pos[2] = - _warpScale * _dataScale * _dataRange[0]; 524 setPosition(pos); 525 TRACE("Z_POS: %g", pos[2]); 526 #endif 519 527 _dsActor->SetMapper(_dsMapper); 520 528 … … 670 678 _normalsGenerator->ComputePointNormalsOn(); 671 679 return _normalsGenerator->GetOutputPort(); 672 //return _warp->GetOutputPort();673 680 } 674 681 } … … 711 718 _normalsGenerator->ComputePointNormalsOn(); 712 719 return _normalsGenerator->GetOutputPort(); 713 //return _warp->GetOutputPort();714 720 } 715 721 } … … 736 742 _warp->SetScaleFactor(_warpScale * _dataScale); 737 743 } 738 744 #ifdef TRANSLATE_TO_ZORIGIN 745 double pos[3]; 746 pos[0] = 0; 747 pos[1] = 0; 748 pos[2] = - _warpScale * _dataScale * _dataRange[0]; 749 setPosition(pos); 750 TRACE("Z_POS: %g", pos[2]); 751 #endif 739 752 if (_dsMapper != NULL) 740 753 _dsMapper->Update(); -
trunk/packages/vizservers/vtkvis/RpHeightMap.h
r3330 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_HEIGHTMAP_H__9 #define __RAPPTURE_VTKVIS_HEIGHTMAP_H__8 #ifndef VTKVIS_HEIGHTMAP_H 9 #define VTKVIS_HEIGHTMAP_H 10 10 11 11 #include <vtkSmartPointer.h> … … 30 30 #include "RpVtkGraphicsObject.h" 31 31 32 namespace Rappture {33 32 namespace VtkVis { 34 33 … … 171 170 172 171 } 173 }174 172 175 173 #endif -
trunk/packages/vizservers/vtkvis/RpLIC.cpp
r3542 r3615 25 25 #include "Trace.h" 26 26 27 using namespace Rappture::VtkVis;27 using namespace VtkVis; 28 28 29 29 LIC::LIC() : -
trunk/packages/vizservers/vtkvis/RpLIC.h
r3542 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_LIC_H__9 #define __RAPPTURE_VTKVIS_LIC_H__8 #ifndef VTKVIS_LIC_H 9 #define VTKVIS_LIC_H 10 10 11 11 #include <vtkSmartPointer.h> … … 24 24 #include "RpVtkGraphicsObject.h" 25 25 26 namespace Rappture {27 26 namespace VtkVis { 28 27 … … 79 78 80 79 } 81 }82 80 83 81 #endif -
trunk/packages/vizservers/vtkvis/RpLine.cpp
r3177 r3615 13 13 #include "Trace.h" 14 14 15 using namespace Rappture::VtkVis;15 using namespace VtkVis; 16 16 17 17 Line::Line() : -
trunk/packages/vizservers/vtkvis/RpLine.h
r3177 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_LINE_H__9 #define __RAPPTURE_VTKVIS_LINE_H__8 #ifndef VTKVIS_LINE_H 9 #define VTKVIS_LINE_H 10 10 11 11 #include <vtkSmartPointer.h> … … 17 17 #include "RpVtkDataSet.h" 18 18 19 namespace Rappture {20 19 namespace VtkVis { 21 20 … … 51 50 52 51 } 53 }54 52 55 53 #endif -
trunk/packages/vizservers/vtkvis/RpMath.h
r3177 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_MATH_H__9 #define __RAPPTURE_VTKVIS_MATH_H__8 #ifndef VTKVIS_MATH_H 9 #define VTKVIS_MATH_H 10 10 11 11 #include <cmath> … … 15 15 #include <vtkMatrix4x4.h> 16 16 17 namespace Rappture {18 17 namespace VtkVis { 19 18 … … 185 184 quat[2]*quat[2] + 186 185 quat[3]*quat[3]; 187 Rappture::VtkVis::quatConjugate(quat, result);186 VtkVis::quatConjugate(quat, result); 188 187 for (int i = 0; i < 4; i++) { 189 188 result[i] /= denom; … … 197 196 inline double *quatReciprocal(double quat[4]) 198 197 { 199 return Rappture::VtkVis::quatReciprocal(quat, quat);198 return VtkVis::quatReciprocal(quat, quat); 200 199 } 201 200 … … 219 218 220 219 } 221 }222 220 223 221 #endif -
trunk/packages/vizservers/vtkvis/RpMolecule.cpp
r3330 r3615 35 35 #include "Trace.h" 36 36 37 using namespace Rappture::VtkVis;37 using namespace VtkVis; 38 38 39 39 Molecule::Molecule() : -
trunk/packages/vizservers/vtkvis/RpMolecule.h
r3195 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_MOLECULE_H__9 #define __RAPPTURE_VTKVIS_MOLECULE_H__8 #ifndef VTKVIS_MOLECULE_H 9 #define VTKVIS_MOLECULE_H 10 10 11 11 #include <vtkSmartPointer.h> … … 24 24 #include "RpVtkGraphicsObject.h" 25 25 26 namespace Rappture {27 26 namespace VtkVis { 28 27 … … 165 164 166 165 } 167 }168 166 169 167 #endif -
trunk/packages/vizservers/vtkvis/RpOutline.cpp
r3535 r3615 17 17 #include "Trace.h" 18 18 19 using namespace Rappture::VtkVis;19 using namespace VtkVis; 20 20 21 21 Outline::Outline() : -
trunk/packages/vizservers/vtkvis/RpOutline.h
r3535 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_OUTLINE_H__9 #define __RAPPTURE_VTKVIS_OUTLINE_H__8 #ifndef VTKVIS_OUTLINE_H 9 #define VTKVIS_OUTLINE_H 10 10 11 11 #include <vtkSmartPointer.h> … … 16 16 #include "RpVtkDataSet.h" 17 17 18 namespace Rappture {19 18 namespace VtkVis { 20 19 … … 44 43 45 44 } 46 }47 45 48 46 #endif -
trunk/packages/vizservers/vtkvis/RpPolyData.cpp
r3427 r3615 22 22 #include "Trace.h" 23 23 24 using namespace Rappture::VtkVis;24 using namespace VtkVis; 25 25 26 26 PolyData::PolyData() : -
trunk/packages/vizservers/vtkvis/RpPolyData.h
r3177 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_POLYDATA_H__9 #define __RAPPTURE_VTKVIS_POLYDATA_H__8 #ifndef VTKVIS_POLYDATA_H 9 #define VTKVIS_POLYDATA_H 10 10 11 11 #include <vtkSmartPointer.h> … … 16 16 #include "RpVtkDataSet.h" 17 17 18 namespace Rappture {19 18 namespace VtkVis { 20 19 … … 44 43 45 44 } 46 }47 45 48 46 #endif -
trunk/packages/vizservers/vtkvis/RpPolygon.cpp
r3177 r3615 13 13 #include "Trace.h" 14 14 15 using namespace Rappture::VtkVis;15 using namespace VtkVis; 16 16 17 17 Polygon::Polygon() : -
trunk/packages/vizservers/vtkvis/RpPolygon.h
r3177 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_POLYGON_H__9 #define __RAPPTURE_VTKVIS_POLYGON_H__8 #ifndef VTKVIS_POLYGON_H 9 #define VTKVIS_POLYGON_H_ 10 10 11 11 #include <vtkSmartPointer.h> … … 17 17 #include "RpVtkDataSet.h" 18 18 19 namespace Rappture {20 19 namespace VtkVis { 21 20 … … 71 70 72 71 } 73 }74 72 75 73 #endif -
trunk/packages/vizservers/vtkvis/RpPseudoColor.cpp
r3542 r3615 31 31 #define MESH_POINT_CLOUDS 32 32 33 using namespace Rappture::VtkVis;33 using namespace VtkVis; 34 34 35 35 PseudoColor::PseudoColor() : -
trunk/packages/vizservers/vtkvis/RpPseudoColor.h
r3330 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_PSEUDOCOLOR_H__9 #define __RAPPTURE_VTKVIS_PSEUDOCOLOR_H__8 #ifndef VTKVIS_PSEUDOCOLOR_H 9 #define VTKVIS_PSEUDOCOLOR_H 10 10 11 11 #include <vtkSmartPointer.h> … … 18 18 #include "RpVtkGraphicsObject.h" 19 19 20 namespace Rappture {21 20 namespace VtkVis { 22 21 … … 89 88 90 89 } 91 }92 90 93 91 #endif -
trunk/packages/vizservers/vtkvis/RpShape.cpp
r3177 r3615 18 18 #include "Trace.h" 19 19 20 using namespace Rappture::VtkVis;20 using namespace VtkVis; 21 21 22 22 Shape::Shape() : -
trunk/packages/vizservers/vtkvis/RpShape.h
r3177 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_SHAPE_H__9 #define __RAPPTURE_VTKVIS_SHAPE_H__8 #ifndef VTKVIS_SHAPE_H 9 #define VTKVIS_SHAPE_H 10 10 11 11 #include <cassert> … … 18 18 #include "RpVtkDataSet.h" 19 19 20 namespace Rappture {21 20 namespace VtkVis { 22 21 … … 50 49 51 50 } 52 }53 51 54 52 #endif -
trunk/packages/vizservers/vtkvis/RpSphere.cpp
r3177 r3615 19 19 #include "Trace.h" 20 20 21 using namespace Rappture::VtkVis;21 using namespace VtkVis; 22 22 23 23 Sphere::Sphere() : -
trunk/packages/vizservers/vtkvis/RpSphere.h
r3177 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_SPHERE_H__9 #define __RAPPTURE_VTKVIS_SPHERE_H__8 #ifndef VTKVIS_SPHERE_H 9 #define VTKVIS_SPHERE_H 10 10 11 11 #include <vtkSmartPointer.h> … … 17 17 #include "RpVtkDataSet.h" 18 18 19 namespace Rappture {20 19 namespace VtkVis { 21 20 … … 91 90 92 91 } 93 }94 92 95 93 #endif -
trunk/packages/vizservers/vtkvis/RpStreamlines.cpp
r3525 r3615 34 34 #include "Trace.h" 35 35 36 using namespace Rappture::VtkVis;36 using namespace VtkVis; 37 37 38 38 Streamlines::Streamlines() : -
trunk/packages/vizservers/vtkvis/RpStreamlines.h
r3177 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_STREAMLINES_H__9 #define __RAPPTURE_VTKVIS_STREAMLINES_H__8 #ifndef VTKVIS_STREAMLINES_H 9 #define VTKVIS_STREAMLINES_H 10 10 11 11 #include <vtkSmartPointer.h> … … 22 22 #include "RpVtkDataSet.h" 23 23 24 namespace Rappture {25 24 namespace VtkVis { 26 25 … … 219 218 220 219 } 221 }222 220 223 221 #endif -
trunk/packages/vizservers/vtkvis/RpTypes.h
r3330 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_TYPES_H__9 #define __RAPPTURE_VTKVIS_TYPES_H__8 #ifndef VTKVIS_TYPES_H 9 #define VTKVIS_TYPES_H 10 10 11 namespace Rappture {12 11 namespace VtkVis { 13 12 … … 25 24 26 25 } 27 }28 26 29 27 #endif -
trunk/packages/vizservers/vtkvis/RpVolume.cpp
r3516 r3615 15 15 #include <vtkVolumeTextureMapper3D.h> 16 16 #include <vtkUnstructuredGrid.h> 17 #include <vtkPolyData.h> 17 18 #include <vtkCellType.h> 18 19 #include <vtkUnstructuredGridVolumeMapper.h> … … 25 26 #include "Trace.h" 26 27 27 using namespace Rappture::VtkVis;28 using namespace VtkVis; 28 29 29 30 Volume::Volume() : -
trunk/packages/vizservers/vtkvis/RpVolume.h
r3177 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_VOLUME_H__9 #define __RAPPTURE_VTKVIS_VOLUME_H__8 #ifndef VTKVIS_VOLUME_H 9 #define VTKVIS_VOLUME_H 10 10 11 11 #include <vtkSmartPointer.h> … … 18 18 #include "ColorMap.h" 19 19 20 namespace Rappture {21 20 namespace VtkVis { 22 21 … … 70 69 71 70 } 72 }73 71 74 72 #endif -
trunk/packages/vizservers/vtkvis/RpVtkDataSet.cpp
r3360 r3615 28 28 #include "Trace.h" 29 29 30 using namespace Rappture::VtkVis;30 using namespace VtkVis; 31 31 32 32 DataSet::DataSet(const std::string& name) : … … 38 38 _cellSizeRange[0] = -1; 39 39 _cellSizeRange[1] = -1; 40 initProp();41 40 } 42 41 43 42 DataSet::~DataSet() 44 43 { 45 }46 47 /**48 * \brief Create and initialize a VTK Prop to render the outline49 */50 void DataSet::initProp()51 {52 if (_prop == NULL) {53 _prop = vtkSmartPointer<vtkActor>::New();54 vtkProperty *property = _prop->GetProperty();55 property->EdgeVisibilityOff();56 property->SetOpacity(_opacity);57 property->SetAmbient(.2);58 property->LightingOff();59 _prop->SetVisibility((_visible ? 1 : 0));60 }61 }62 63 /**64 * \brief Create and initialize a wireframe outline65 */66 void DataSet::showOutline(bool state)67 {68 if (state) {69 if (_outlineFilter == NULL) {70 _outlineFilter = vtkSmartPointer<vtkOutlineFilter>::New();71 #ifdef USE_VTK672 _outlineFilter->SetInputData(_dataSet);73 #else74 _outlineFilter->SetInput(_dataSet);75 #endif76 }77 if (_outlineMapper == NULL) {78 _outlineMapper = vtkSmartPointer<vtkPolyDataMapper>::New();79 _outlineMapper->SetInputConnection(_outlineFilter->GetOutputPort());80 }81 initProp();82 _prop->SetMapper(_outlineMapper);83 } else {84 if (_prop != NULL) {85 _prop->SetMapper(NULL);86 }87 if (_outlineMapper != NULL) {88 _outlineMapper = NULL;89 }90 if (_outlineFilter != NULL) {91 _outlineFilter = NULL;92 }93 }94 }95 96 /**97 * \brief Set color of outline bounding box98 */99 void DataSet::setOutlineColor(float color[3])100 {101 if (_prop == NULL) {102 initProp();103 }104 _prop->GetProperty()->SetColor(color[0], color[1], color[2]);105 44 } 106 45 … … 115 54 { 116 55 _opacity = opacity; 117 if (_prop != NULL) {118 _prop->GetProperty()->SetOpacity(opacity);119 }120 56 } 121 57 … … 130 66 { 131 67 _visible = state; 132 if (_prop != NULL) {133 _prop->SetVisibility((state ? 1 : 0));134 }135 68 } 136 69 -
trunk/packages/vizservers/vtkvis/RpVtkDataSet.h
r3330 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_DATASET_H__9 #define __RAPPTURE_VTKVIS_DATASET_H__8 #ifndef VTKVIS_DATASET_H 9 #define VTKVIS_DATASET_H 10 10 11 11 #include <vtkSmartPointer.h> 12 12 #include <vtkDataSet.h> 13 13 #include <vtkDataSetReader.h> 14 #include <vtkProp.h>15 #include <vtkActor.h>16 #include <vtkOutlineFilter.h>17 #include <vtkPolyDataMapper.h>18 14 19 15 #include <string> … … 23 19 #include "Trace.h" 24 20 25 namespace Rappture {26 21 namespace VtkVis { 27 22 … … 126 121 bool getVisibility() const; 127 122 128 void showOutline(bool state);129 130 void setOutlineColor(float color[3]);131 132 void setClippingPlanes(vtkPlaneCollection *planes)133 {134 if (_outlineMapper != NULL) {135 _outlineMapper->SetClippingPlanes(planes);136 }137 }138 139 /**140 * \brief Return the VTK prop object for the outline141 */142 inline vtkProp *getProp()143 {144 return _prop;145 }146 147 /**148 * \brief Set 2D aspect ratio scaling149 *150 * \param aspect 0=no scaling, otherwise aspect151 * is horiz/vertical ratio152 */153 void setAspect(double aspect)154 {155 double scale[3];156 scale[0] = scale[1] = scale[2] = 1.;157 158 if (aspect == 0.0) {159 setScale(scale);160 return;161 }162 if (_dataSet == NULL) {163 TRACE("Not setting aspect for empty data set");164 return;165 }166 167 PrincipalPlane plane;168 if (!is2D(&plane)) {169 TRACE("Not setting aspect for 3D data set");170 return;171 }172 173 double bounds[6];174 getBounds(bounds);175 176 double size[3];177 size[0] = bounds[1] - bounds[0];178 size[1] = bounds[3] - bounds[2];179 size[2] = bounds[5] - bounds[4];180 181 if (aspect == 1.0) {182 // Square183 switch (plane) {184 case PLANE_XY: {185 if (size[0] > size[1] && size[1] > 1.0e-6) {186 scale[1] = size[0] / size[1];187 } else if (size[1] > size[0] && size[0] > 1.0e-6) {188 scale[0] = size[1] / size[0];189 }190 }191 break;192 case PLANE_ZY: {193 if (size[1] > size[2] && size[2] > 1.0e-6) {194 scale[2] = size[1] / size[2];195 } else if (size[2] > size[1] && size[1] > 1.0e-6) {196 scale[1] = size[2] / size[1];197 }198 }199 break;200 case PLANE_XZ: {201 if (size[0] > size[2] && size[2] > 1.0e-6) {202 scale[2] = size[0] / size[2];203 } else if (size[2] > size[0] && size[0] > 1.0e-6) {204 scale[0] = size[2] / size[0];205 }206 }207 break;208 default:209 break;210 }211 } else {212 switch (plane) {213 case PLANE_XY: {214 if (aspect > 1.0) {215 if (size[0] > size[1]) {216 scale[1] = (size[0] / aspect) / size[1];217 } else {218 scale[0] = (size[1] * aspect) / size[0];219 }220 } else {221 if (size[1] > size[0]) {222 scale[0] = (size[1] * aspect) / size[0];223 } else {224 scale[1] = (size[0] / aspect) / size[1];225 }226 }227 }228 break;229 case PLANE_ZY: {230 if (aspect > 1.0) {231 if (size[2] > size[1]) {232 scale[1] = (size[2] / aspect) / size[1];233 } else {234 scale[2] = (size[1] * aspect) / size[2];235 }236 } else {237 if (size[1] > size[2]) {238 scale[2] = (size[1] * aspect) / size[2];239 } else {240 scale[1] = (size[2] / aspect) / size[1];241 }242 }243 }244 break;245 case PLANE_XZ: {246 if (aspect > 1.0) {247 if (size[0] > size[2]) {248 scale[2] = (size[0] / aspect) / size[2];249 } else {250 scale[0] = (size[2] * aspect) / size[0];251 }252 } else {253 if (size[2] > size[0]) {254 scale[0] = (size[2] * aspect) / size[0];255 } else {256 scale[2] = (size[0] / aspect) / size[2];257 }258 }259 }260 default:261 break;262 }263 }264 265 TRACE("obj %g,%g,%g", size[0], size[1], size[2]);266 TRACE("Setting scale to %g,%g,%g", scale[0], scale[1], scale[2]);267 setScale(scale);268 }269 270 /**271 * \brief Get the prop scaling272 *273 * \param[out] scale Scaling in x,y,z274 */275 void getScale(double scale[3])276 {277 if (_prop != NULL) {278 _prop->GetScale(scale);279 } else {280 scale[0] = scale[1] = scale[2] = 1.0;281 }282 }283 284 /**285 * \brief Set the prop scaling286 *287 * \param[in] scale Scaling in x,y,z288 */289 void setScale(double scale[3])290 {291 if (_prop != NULL) {292 _prop->SetScale(scale);293 }294 }295 296 123 static void print(vtkDataSet *ds); 297 124 … … 302 129 void print() const; 303 130 304 void initProp();305 306 131 std::string _name; 307 132 vtkSmartPointer<vtkDataSet> _dataSet; … … 310 135 double _cellSizeRange[2]; 311 136 double _cellSizeAverage; 312 vtkSmartPointer<vtkOutlineFilter> _outlineFilter;313 vtkSmartPointer<vtkActor> _prop;314 vtkSmartPointer<vtkPolyDataMapper> _outlineMapper;315 137 }; 316 138 317 139 } 318 }319 140 320 141 #endif -
trunk/packages/vizservers/vtkvis/RpVtkGraphicsObject.cpp
r3177 r3615 10 10 #include "Trace.h" 11 11 12 using namespace Rappture::VtkVis;12 using namespace VtkVis; 13 13 14 14 void VtkGraphicsObject::setDataSet(DataSet *dataSet, -
trunk/packages/vizservers/vtkvis/RpVtkGraphicsObject.h
r3330 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_VTKGRAPHICSOBJECT_H__9 #define __RAPPTURE_VTKVIS_VTKGRAPHICSOBJECT_H__8 #ifndef VTKVIS_VTKGRAPHICSOBJECT_H 9 #define VTKVIS_VTKGRAPHICSOBJECT_H 10 10 11 11 #include <cmath> … … 28 28 #include "Trace.h" 29 29 30 namespace Rappture {31 30 namespace VtkVis { 32 31 … … 931 930 932 931 } 933 }934 932 935 933 #endif -
trunk/packages/vizservers/vtkvis/RpVtkRenderServer.cpp
r3600 r3615 36 36 #include <md5.h> 37 37 38 using namespace Rappture::VtkVis;39 40 Stats Rappture::VtkVis::g_stats;41 42 int Rappture::VtkVis::g_statsFile = -1; ///< Stats output file descriptor.43 int Rappture::VtkVis::g_fdIn = STDIN_FILENO; ///< Input file descriptor44 int Rappture::VtkVis::g_fdOut = STDOUT_FILENO; ///< Output file descriptor45 FILE * Rappture::VtkVis::g_fOut = stdout; ///< Output file handle46 FILE * Rappture::VtkVis::g_fLog = NULL; ///< Trace logging file handle47 Renderer * Rappture::VtkVis::g_renderer = NULL; ///< Main render worker48 ReadBuffer * Rappture::VtkVis::g_inBufPtr = NULL; ///< Socket read buffer38 using namespace VtkVis; 39 40 Stats VtkVis::g_stats; 41 42 int VtkVis::g_statsFile = -1; ///< Stats output file descriptor. 43 int VtkVis::g_fdIn = STDIN_FILENO; ///< Input file descriptor 44 int VtkVis::g_fdOut = STDOUT_FILENO; ///< Output file descriptor 45 FILE *VtkVis::g_fOut = stdout; ///< Output file handle 46 FILE *VtkVis::g_fLog = NULL; ///< Trace logging file handle 47 Renderer *VtkVis::g_renderer = NULL; ///< Main render worker 48 ReadBuffer *VtkVis::g_inBufPtr = NULL; ///< Socket read buffer 49 49 50 50 #ifdef USE_THREADS … … 216 216 217 217 int 218 Rappture::VtkVis::getStatsFile(Tcl_Interp *interp, Tcl_Obj *objPtr)218 VtkVis::getStatsFile(Tcl_Interp *interp, Tcl_Obj *objPtr) 219 219 { 220 220 Tcl_DString ds; … … 261 261 262 262 int 263 Rappture::VtkVis::writeToStatsFile(int f, const char *s, size_t length)263 VtkVis::writeToStatsFile(int f, const char *s, size_t length) 264 264 { 265 265 if (f >= 0) { … … 498 498 * also be used to supply information about the server (version, memory 499 499 * size, etc). */ 500 fprintf(g_fOut, "VtkVis 1.2 (build %s)\n", SVN_VERSION);500 fprintf(g_fOut, "VtkVis %s (build %s)\n", VTKVIS_VERSION_STRING, SVN_VERSION); 501 501 fflush(g_fOut); 502 502 … … 505 505 506 506 Tcl_Interp *interp = Tcl_CreateInterp(); 507 508 507 ClientData clientData = NULL; 509 508 #ifdef USE_THREADS 510 ResponseQueue *queue = new ResponseQueue( (void *)interp);509 ResponseQueue *queue = new ResponseQueue(); 511 510 clientData = (ClientData)queue; 512 511 initTcl(interp, clientData); -
trunk/packages/vizservers/vtkvis/RpVtkRenderServer.h
r3451 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_RENDERSERVER_H__9 #define __RAPPTURE_VTKVIS_RENDERSERVER_H__8 #ifndef VTKVIS_RENDERSERVER_H 9 #define VTKVIS_RENDERSERVER_H 10 10 11 11 #include <sys/types.h> 12 12 #include <sys/time.h> 13 13 14 namespace Rappture {15 14 namespace VtkVis { 16 15 17 16 class Renderer; 17 18 #define VTKVIS_VERSION_STRING "1.3" 18 19 19 20 #define MSECS_ELAPSED(t1, t2) \ … … 51 52 52 53 } 53 }54 54 55 55 #endif -
trunk/packages/vizservers/vtkvis/RpVtkRenderer.cpp
r3535 r3615 50 50 (((t2).tv_sec - (t1).tv_sec))*1.0e+3 + (double)((t2).tv_usec - (t1).tv_usec)/1.0e+3) 51 51 52 using namespace Rappture::VtkVis; 52 #define printCameraInfo(camera) \ 53 do { \ 54 TRACE("pscale: %g, angle: %g, d: %g pos: %g %g %g, fpt: %g %g %g, vup: %g %g %g, clip: %g %g", \ 55 (camera)->GetParallelScale(), \ 56 (camera)->GetViewAngle(), \ 57 (camera)->GetDistance(), \ 58 (camera)->GetPosition()[0], \ 59 (camera)->GetPosition()[1], \ 60 (camera)->GetPosition()[2], \ 61 (camera)->GetFocalPoint()[0], \ 62 (camera)->GetFocalPoint()[1], \ 63 (camera)->GetFocalPoint()[2], \ 64 (camera)->GetViewUp()[0], \ 65 (camera)->GetViewUp()[1], \ 66 (camera)->GetViewUp()[2], \ 67 (camera)->GetClippingRange()[0], \ 68 (camera)->GetClippingRange()[1]); \ 69 } while(0) 70 71 using namespace VtkVis; 53 72 54 73 Renderer::Renderer() : … … 250 269 deleteGraphicsObject<Volume>(itr->second->getName()); 251 270 deleteGraphicsObject<Warp>(itr->second->getName()); 252 253 if (itr->second->getProp() != NULL) {254 _renderer->RemoveViewProp(itr->second->getProp());255 }256 271 257 272 TRACE("After deleting graphics objects"); … … 667 682 _cubeAxesActor->GetXAxisRange(&ranges[0]); 668 683 } 684 669 685 if (_axesRangeMode[Y_AXIS] != RANGE_EXPLICIT) { 670 686 ranges[2] = bounds[2] * _axesScale[Y_AXIS]; … … 2191 2207 void Renderer::setObjectAspects(double aspectRatio) 2192 2208 { 2193 for (DataSetHashmap::iterator itr = _dataSets.begin();2194 itr != _dataSets.end(); ++itr) {2195 itr->second->setAspect(aspectRatio);2196 }2197 2198 2209 setGraphicsObjectAspect<Arc>(aspectRatio); 2199 2210 setGraphicsObjectAspect<Arrow>(aspectRatio); … … 2396 2407 setCameraFromMatrix(camera, *trans->GetMatrix()); 2397 2408 2398 _renderer->ResetCameraClippingRange();2409 resetCameraClippingRange(); 2399 2410 printCameraInfo(camera); 2400 2411 _needsRedraw = true; … … 2416 2427 camera->SetFocalPoint(focalPoint); 2417 2428 camera->SetViewUp(viewUp); 2418 _renderer->ResetCameraClippingRange();2429 resetCameraClippingRange(); 2419 2430 _needsRedraw = true; 2420 2431 } … … 2456 2467 void Renderer::resetCamera(bool resetOrientation) 2457 2468 { 2469 TRACE("Enter: %d", resetOrientation ? 1 : 0); 2458 2470 vtkSmartPointer<vtkCamera> camera = _renderer->GetActiveCamera(); 2459 2471 if (_cameraMode == IMAGE) { … … 2477 2489 _needsAxesReset = false; 2478 2490 } 2479 _renderer->ResetCamera(); 2480 _renderer->ResetCameraClippingRange(); 2491 resetVtkCamera(); 2481 2492 //computeScreenWorldCoords(); 2482 2493 } … … 2493 2504 void Renderer::resetVtkCamera(double *bounds) 2494 2505 { 2506 TRACE("Enter: bounds: %p", bounds); 2495 2507 if (bounds != NULL) 2496 2508 _renderer->ResetCamera(bounds); 2497 2509 else 2498 2510 _renderer->ResetCamera(); 2511 printCameraInfo(_renderer->GetActiveCamera()); 2499 2512 } 2500 2513 … … 2505 2518 { 2506 2519 _renderer->ResetCameraClippingRange(); 2520 vtkSmartPointer<vtkCamera> camera = _renderer->GetActiveCamera(); 2521 //double dist = camera->GetClippingRange()[0] + (camera->GetClippingRange()[1] - camera->GetClippingRange()[0])/2.0; 2522 //camera->SetDistance(dist); 2523 printCameraInfo(camera); 2507 2524 } 2508 2525 … … 2522 2539 //camera->SetPitch(pitch); // Rotate about camera 2523 2540 camera->Roll(roll); // Roll about camera view axis 2524 _renderer->ResetCameraClippingRange();2541 resetCameraClippingRange(); 2525 2542 //computeScreenWorldCoords(); 2526 2543 _needsRedraw = true; … … 2623 2640 motionVector[2] + viewPoint[2]); 2624 2641 2625 _renderer->ResetCameraClippingRange();2642 resetCameraClippingRange(); 2626 2643 //computeScreenWorldCoords(); 2627 2644 } … … 2677 2694 // Change ortho parallel scale 2678 2695 camera->SetParallelScale(camera->GetParallelScale()/z); 2679 _renderer->ResetCameraClippingRange();2696 resetCameraClippingRange(); 2680 2697 //computeScreenWorldCoords(); 2681 2698 } … … 3108 3125 bounds[5] = -DBL_MAX; 3109 3126 3110 for (DataSetHashmap::iterator itr = _dataSets.begin();3111 itr != _dataSets.end(); ++itr) {3112 if ((!onlyVisible || itr->second->getVisibility()) &&3113 itr->second->getProp() != NULL)3114 mergeBounds(bounds, bounds, itr->second->getProp()->GetBounds());3115 }3116 3117 3127 mergeGraphicsObjectBounds<Arc>(bounds, onlyVisible); 3118 3128 mergeGraphicsObjectBounds<Arrow>(bounds, onlyVisible); … … 3183 3193 bounds[4] = DBL_MAX; 3184 3194 bounds[5] = -DBL_MAX; 3185 3186 for (DataSetHashmap::iterator itr = _dataSets.begin();3187 itr != _dataSets.end(); ++itr) {3188 if ((!onlyVisible || itr->second->getVisibility()) &&3189 itr->second->getProp() != NULL) {3190 double dsBounds[6];3191 itr->second->getBounds(dsBounds);3192 mergeBounds(bounds, bounds, dsBounds);3193 }3194 }3195 3195 3196 3196 mergeGraphicsObjectUnscaledBounds<Arc>(bounds, onlyVisible); … … 3848 3848 resetAxes(bounds); 3849 3849 //_renderer->ResetCamera(bounds); 3850 _renderer->ResetCamera(); 3851 _renderer->ResetCameraClippingRange(); 3850 resetVtkCamera(); 3852 3851 //computeScreenWorldCoords(); 3853 3852 break; … … 3856 3855 resetAxes(bounds); 3857 3856 //_renderer->ResetCamera(bounds); 3858 _renderer->ResetCamera(); 3859 _renderer->ResetCameraClippingRange(); 3857 resetVtkCamera(); 3860 3858 //computeScreenWorldCoords(); 3861 3859 break; … … 3869 3867 } 3870 3868 3869 #if 0 3871 3870 /** 3872 3871 * \brief Print debugging info about a vtkCamera … … 3890 3889 camera->GetClippingRange()[1]); 3891 3890 } 3891 #endif 3892 3892 3893 3893 /** … … 4016 4016 4017 4017 /** 4018 * \brief Toggle rendering of actors' bounding box4019 */4020 void Renderer::setDataSetShowBounds(const DataSetId& id, bool state)4021 {4022 DataSetHashmap::iterator itr;4023 4024 bool doAll = false;4025 4026 if (id.compare("all") == 0) {4027 itr = _dataSets.begin();4028 if (itr == _dataSets.end())4029 return;4030 doAll = true;4031 } else {4032 itr = _dataSets.find(id);4033 }4034 if (itr == _dataSets.end()) {4035 ERROR("Unknown dataset %s", id.c_str());4036 return;4037 }4038 4039 do {4040 if (!state && itr->second->getProp()) {4041 _renderer->RemoveViewProp(itr->second->getProp());4042 }4043 4044 itr->second->showOutline(state);4045 4046 if (state && !_renderer->HasViewProp(itr->second->getProp())) {4047 _renderer->AddViewProp(itr->second->getProp());4048 }4049 } while (doAll && ++itr != _dataSets.end());4050 4051 sceneBoundsChanged();4052 _needsRedraw = true;4053 }4054 4055 /**4056 * \brief Set color of outline bounding box4057 */4058 void Renderer::setDataSetOutlineColor(const DataSetId& id, float color[3])4059 {4060 DataSetHashmap::iterator itr;4061 4062 bool doAll = false;4063 4064 if (id.compare("all") == 0) {4065 itr = _dataSets.begin();4066 if (itr == _dataSets.end())4067 return;4068 doAll = true;4069 } else {4070 itr = _dataSets.find(id);4071 }4072 if (itr == _dataSets.end()) {4073 ERROR("Unknown dataset %s", id.c_str());4074 return;4075 }4076 4077 do {4078 itr->second->setOutlineColor(color);4079 } while (doAll && ++itr != _dataSets.end());4080 4081 _needsRedraw = true;4082 }4083 4084 /**4085 4018 * \brief Set a user clipping plane 4086 4019 * … … 4199 4132 * Mappers already using the PlaneCollection 4200 4133 */ 4201 // First set clip planes for DataSet bounding boxes4202 for (DataSetHashmap::iterator itr = _dataSets.begin();4203 itr != _dataSets.end(); ++itr) {4204 itr->second->setClippingPlanes(_activeClipPlanes);4205 }4206 4207 4134 setGraphicsObjectClippingPlanes<Arc>(_activeClipPlanes); 4208 4135 setGraphicsObjectClippingPlanes<Arrow>(_activeClipPlanes); … … 4264 4191 bool Renderer::render() 4265 4192 { 4193 TRACE("Enter: redraw: %d axesReset: %d cameraReset: %d clippingRangeReset: %d", 4194 _needsRedraw ? 1 : 0, _needsAxesReset ? 1 : 0, _needsCameraReset ? 1 : 0, _needsCameraClippingRangeReset ? 1 : 0); 4266 4195 if (_needsRedraw) { 4267 4196 if (_needsAxesReset) { -
trunk/packages/vizservers/vtkvis/RpVtkRenderer.h
r3542 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_RENDERER_H__9 #define __RAPPTURE_VTKVIS_RENDERER_H__8 #ifndef VTKVIS_RENDERER_H 9 #define VTKVIS_RENDERER_H 10 10 11 11 #include <string> … … 57 57 #define TARGA_BYTES_PER_PIXEL 3 58 58 59 namespace Rappture {60 59 namespace VtkVis { 61 60 … … 138 137 139 138 bool getVectorValue(const DataSetId& id, double x, double y, double z, double vector[3]); 140 141 void setDataSetShowBounds(const DataSetId& id, bool state);142 143 void setDataSetOutlineColor(const DataSetId& id, float color[3]);144 139 145 140 void setDataSetOpacity(const DataSetId& id, double opacity); … … 577 572 bool addContour2D(const DataSetId& id, const std::vector<double>& contours); 578 573 574 void setContour2DContourField(const DataSetId& id, const char *fieldName); 575 579 576 void setContour2DNumContours(const DataSetId& id, int numContours); 580 577 … … 595 592 596 593 bool addContour3D(const DataSetId& id, const std::vector<double>& contours); 594 595 void setContour3DContourField(const DataSetId& id, const char *fieldName); 597 596 598 597 void setContour3DNumContours(const DataSetId& id, int numContours); … … 851 850 void _setCameraZoomRegion(double x, double y, double width, double height); 852 851 853 static void printCameraInfo(vtkCamera *camera);852 //static void printCameraInfo(vtkCamera *camera); 854 853 855 854 static void setCameraFromMatrix(vtkCamera *camera, vtkMatrix4x4 &mat); … … 994 993 995 994 } 996 }997 995 998 996 #endif -
trunk/packages/vizservers/vtkvis/RpVtkRendererCmd.cpp
r3542 r3615 32 32 #endif 33 33 34 using namespace Rappture::VtkVis;34 using namespace VtkVis; 35 35 36 36 static int lastCmdStatus; … … 38 38 #ifdef USE_THREADS 39 39 void 40 Rappture::VtkVis::queueResponse(ClientData clientData,41 42 43 40 VtkVis::queueResponse(ClientData clientData, 41 const void *bytes, size_t len, 42 Response::AllocationType allocType, 43 Response::ResponseType type) 44 44 { 45 45 ResponseQueue *queue = (ResponseQueue *)clientData; … … 2127 2127 char buf[BUFSIZ]; 2128 2128 const char *string; 2129 int f;2130 int i;2131 2129 int length; 2132 2130 int result; … … 2135 2133 /* Use the initial client key value pairs as the parts for a generating 2136 2134 * a unique file name. */ 2137 f = Rappture::VtkVis::getStatsFile(interp, objv[1]);2138 if (f < 0) {2135 int fd = VtkVis::getStatsFile(interp, objv[1]); 2136 if (fd < 0) { 2139 2137 Tcl_AppendResult(interp, "can't open stats file: ", 2140 2138 Tcl_PosixError(interp), (char *)NULL); … … 2169 2167 /* date */ 2170 2168 Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj("date", 4)); 2171 strcpy(buf, ctime(& Rappture::VtkVis::g_stats.start.tv_sec));2169 strcpy(buf, ctime(&VtkVis::g_stats.start.tv_sec)); 2172 2170 buf[strlen(buf) - 1] = '\0'; 2173 2171 Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj(buf, -1)); 2174 2172 /* date_secs */ 2175 2173 Tcl_ListObjAppendElement(interp, listObjPtr, 2176 Tcl_NewStringObj("date_secs", 9));2174 Tcl_NewStringObj("date_secs", 9)); 2177 2175 Tcl_ListObjAppendElement(interp, listObjPtr, 2178 Tcl_NewLongObj(Rappture::VtkVis::g_stats.start.tv_sec));2176 Tcl_NewLongObj(VtkVis::g_stats.start.tv_sec)); 2179 2177 /* Client arguments. */ 2180 2178 if (Tcl_ListObjGetElements(interp, objv[1], &numItems, &items) != TCL_OK) { 2181 2179 return TCL_ERROR; 2182 2180 } 2183 for (i = 0; i < numItems; i++) {2181 for (int i = 0; i < numItems; i++) { 2184 2182 Tcl_ListObjAppendElement(interp, listObjPtr, items[i]); 2185 2183 } … … 2188 2186 Tcl_DStringAppend(&ds, string, length); 2189 2187 Tcl_DStringAppend(&ds, "\n", 1); 2190 result = Rappture::VtkVis::writeToStatsFile(f, Tcl_DStringValue(&ds),2191 2188 result = VtkVis::writeToStatsFile(fd, Tcl_DStringValue(&ds), 2189 Tcl_DStringLength(&ds)); 2192 2190 Tcl_DStringFree(&ds); 2193 2191 Tcl_DecrRefCount(listObjPtr); … … 3161 3159 3162 3160 static int 3161 Contour3DContourFieldOp(ClientData clientData, Tcl_Interp *interp, int objc, 3162 Tcl_Obj *const *objv) 3163 { 3164 const char *fieldName = Tcl_GetString(objv[2]); 3165 if (objc == 4) { 3166 const char *dataSetName = Tcl_GetString(objv[3]); 3167 g_renderer->setContour3DContourField(dataSetName, fieldName); 3168 } else { 3169 g_renderer->setContour3DContourField("all", fieldName); 3170 } 3171 return TCL_OK; 3172 } 3173 3174 static int 3163 3175 Contour3DContourListOp(ClientData clientData, Tcl_Interp *interp, int objc, 3164 3176 Tcl_Obj *const *objv) … … 3405 3417 {"colormap", 7, Contour3DColorMapOp, 3, 4, "colorMapName ?dataSetName?"}, 3406 3418 {"colormode", 7, Contour3DColorModeOp, 4, 5, "mode fieldName ?dataSetName?"}, 3407 {"contourlist", 3, Contour3DContourListOp, 3, 4, "contourList ?dataSetName?"}, 3419 {"contourfield", 8, Contour3DContourFieldOp, 3, 4, "fieldName ?dataSetName?"}, 3420 {"contourlist", 8, Contour3DContourListOp, 3, 4, "contourList ?dataSetName?"}, 3408 3421 {"delete", 1, Contour3DDeleteOp, 2, 3, "?dataSetName?"}, 3409 3422 {"edges", 1, Contour3DEdgeVisibilityOp, 3, 4, "bool ?dataSetName?"}, … … 4535 4548 4536 4549 static int 4537 DataSet OutlineOp(ClientData clientData, Tcl_Interp *interp, int objc,4550 DataSetVisibleOp(ClientData clientData, Tcl_Interp *interp, int objc, 4538 4551 Tcl_Obj *const *objv) 4539 4552 { … … 4544 4557 if (objc == 4) { 4545 4558 const char *name = Tcl_GetString(objv[3]); 4546 g_renderer->setDataSetShowBounds(name, state);4547 } else {4548 g_renderer->setDataSetShowBounds("all", state);4549 }4550 return TCL_OK;4551 }4552 4553 static int4554 DataSetOutlineColorOp(ClientData clientData, Tcl_Interp *interp, int objc,4555 Tcl_Obj *const *objv)4556 {4557 float color[3];4558 if (GetFloatFromObj(interp, objv[2], &color[0]) != TCL_OK ||4559 GetFloatFromObj(interp, objv[3], &color[1]) != TCL_OK ||4560 GetFloatFromObj(interp, objv[4], &color[2]) != TCL_OK) {4561 return TCL_ERROR;4562 }4563 if (objc == 6) {4564 const char *name = Tcl_GetString(objv[5]);4565 g_renderer->setDataSetOutlineColor(name, color);4566 } else {4567 g_renderer->setDataSetOutlineColor("all", color);4568 }4569 return TCL_OK;4570 }4571 4572 static int4573 DataSetVisibleOp(ClientData clientData, Tcl_Interp *interp, int objc,4574 Tcl_Obj *const *objv)4575 {4576 bool state;4577 if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) {4578 return TCL_ERROR;4579 }4580 if (objc == 4) {4581 const char *name = Tcl_GetString(objv[3]);4582 4559 g_renderer->setDataSetVisibility(name, state); 4583 4560 } else { … … 4589 4566 static Rappture::CmdSpec dataSetOps[] = { 4590 4567 {"add", 1, DataSetAddOp, 6, 6, "name data follows nBytes"}, 4591 {"color", 1, DataSetOutlineColorOp, 5, 6, "r g b ?name?"},4592 4568 {"delete", 1, DataSetDeleteOp, 2, 3, "?name?"}, 4593 4569 {"getscalar", 4, DataSetGetScalarOp, 6, 7, "oper x y ?z? name"}, … … 4596 4572 {"names", 1, DataSetNamesOp, 2, 2, ""}, 4597 4573 {"opacity", 2, DataSetOpacityOp, 3, 4, "value ?name?"}, 4598 {"outline", 2, DataSetOutlineOp, 3, 4, "bool ?name?"},4599 4574 {"scalar", 1, DataSetActiveScalarsOp, 3, 4, "scalarName ?name?"}, 4600 4575 {"vector", 2, DataSetActiveVectorsOp, 3, 4, "vectorName ?name?"}, … … 6003 5978 static int 6004 5979 ImageFlushCmd(ClientData clientData, Tcl_Interp *interp, int objc, 6005 Tcl_Obj *const *objv)5980 Tcl_Obj *const *objv) 6006 5981 { 6007 5982 lastCmdStatus = TCL_BREAK; … … 10027 10002 */ 10028 10003 int 10029 Rappture::VtkVis::processCommands(Tcl_Interp *interp,10030 10031 10032 10004 VtkVis::processCommands(Tcl_Interp *interp, 10005 ClientData clientData, 10006 ReadBuffer *inBufPtr, 10007 int fdOut) 10033 10008 { 10034 10009 int ret = 1; … … 10098 10073 */ 10099 10074 int 10100 Rappture::VtkVis::handleError(Tcl_Interp *interp,10101 10102 10075 VtkVis::handleError(Tcl_Interp *interp, 10076 ClientData clientData, 10077 int status, int fdOut) 10103 10078 { 10104 10079 const char *string; … … 10155 10130 */ 10156 10131 void 10157 Rappture::VtkVis::initTcl(Tcl_Interp *interp, ClientData clientData)10132 VtkVis::initTcl(Tcl_Interp *interp, ClientData clientData) 10158 10133 { 10159 10134 Tcl_MakeSafe(interp); … … 10194 10169 * \brief Delete Tcl commands and interpreter 10195 10170 */ 10196 void Rappture::VtkVis::exitTcl(Tcl_Interp *interp)10171 void VtkVis::exitTcl(Tcl_Interp *interp) 10197 10172 { 10198 10173 Tcl_DeleteCommand(interp, "arc"); -
trunk/packages/vizservers/vtkvis/RpVtkRendererCmd.h
r3451 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_RENDERERCMD_H__9 #define __RAPPTURE_VTKVIS_RENDERERCMD_H__8 #ifndef VTKVIS_RENDERERCMD_H 9 #define VTKVIS_RENDERERCMD_H 10 10 11 11 #include <cstdio> … … 17 17 #endif 18 18 19 namespace Rappture {20 19 namespace VtkVis { 21 20 … … 42 41 43 42 } 44 }45 43 46 44 #endif -
trunk/packages/vizservers/vtkvis/RpVtkRendererGraphicsObjs.cpp
r3542 r3615 36 36 37 37 // Template specializations 38 namespace Rappture {39 38 namespace VtkVis { 40 39 … … 260 259 261 260 } 262 } 263 264 using namespace Rappture::VtkVis; 261 262 using namespace VtkVis; 265 263 266 264 /** … … 585 583 586 584 /** 585 * \brief Set the number of equally spaced isosurfaces for the given DataSet 586 */ 587 void Renderer::setContour2DContourField(const DataSetId& id, const char *fieldName) 588 { 589 Contour2DHashmap::iterator itr; 590 591 bool doAll = false; 592 593 if (id.compare("all") == 0) { 594 itr = _contour2Ds.begin(); 595 doAll = true; 596 } else { 597 itr = _contour2Ds.find(id); 598 } 599 if (itr == _contour2Ds.end()) { 600 ERROR("Contour2D not found: %s", id.c_str()); 601 return; 602 } 603 604 do { 605 itr->second->setContourField(fieldName); 606 } while (doAll && ++itr != _contour2Ds.end()); 607 608 sceneBoundsChanged(); 609 _needsRedraw = true; 610 } 611 612 /** 587 613 * \brief Set a list of isovalues for the given DataSet 588 614 */ … … 767 793 _needsRedraw = true; 768 794 return true; 795 } 796 797 /** 798 * \brief Set the number of equally spaced isosurfaces for the given DataSet 799 */ 800 void Renderer::setContour3DContourField(const DataSetId& id, const char *fieldName) 801 { 802 Contour3DHashmap::iterator itr; 803 804 bool doAll = false; 805 806 if (id.compare("all") == 0) { 807 itr = _contour3Ds.begin(); 808 doAll = true; 809 } else { 810 itr = _contour3Ds.find(id); 811 } 812 if (itr == _contour3Ds.end()) { 813 ERROR("Contour3D not found: %s", id.c_str()); 814 return; 815 } 816 817 do { 818 itr->second->setContourField(fieldName); 819 } while (doAll && ++itr != _contour3Ds.end()); 820 821 sceneBoundsChanged(); 822 _needsRedraw = true; 769 823 } 770 824 -
trunk/packages/vizservers/vtkvis/RpVtkRendererGraphicsObjs.h
r3542 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_RENDERER_GRAPHICS_OBJS_H__9 #define __RAPPTURE_VTKVIS_RENDERER_GRAPHICS_OBJS_H__8 #ifndef VTKVIS_RENDERER_GRAPHICS_OBJS_H 9 #define VTKVIS_RENDERER_GRAPHICS_OBJS_H 10 10 11 11 #include <tr1/unordered_map> … … 40 40 #include "RpVtkRenderer.h" 41 41 42 namespace Rappture {43 42 namespace VtkVis { 44 43 … … 1025 1024 1026 1025 } 1027 }1028 1026 1029 1027 #endif -
trunk/packages/vizservers/vtkvis/RpWarp.cpp
r3542 r3615 32 32 #define MESH_POINT_CLOUDS 33 33 34 using namespace Rappture::VtkVis;34 using namespace VtkVis; 35 35 36 36 Warp::Warp() : -
trunk/packages/vizservers/vtkvis/RpWarp.h
r3542 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_WARP_H__9 #define __RAPPTURE_VTKVIS_WARP_H__8 #ifndef VTKVIS_WARP_H 9 #define VTKVIS_WARP_H 10 10 11 11 #include <vtkSmartPointer.h> … … 21 21 #include "RpVtkGraphicsObject.h" 22 22 23 namespace Rappture {24 23 namespace VtkVis { 25 24 … … 108 107 109 108 } 110 }111 109 112 110 #endif -
trunk/packages/vizservers/vtkvis/TGAWriter.cpp
r3177 r3615 37 37 */ 38 38 void 39 Rappture::VtkVis::queueTGA(ResponseQueue *queue, const char *cmdName,40 41 42 39 VtkVis::queueTGA(ResponseQueue *queue, const char *cmdName, 40 const unsigned char *data, 41 int width, int height, 42 int bytesPerPixel) 43 43 { 44 44 TRACE("(%dx%d)\n", width, height); … … 102 102 */ 103 103 void 104 Rappture::VtkVis::writeTGA(int fd, const char *cmdName,105 106 107 104 VtkVis::writeTGA(int fd, const char *cmdName, 105 const unsigned char *data, 106 int width, int height, 107 int bytesPerPixel) 108 108 { 109 109 TRACE("(%dx%d)\n", width, height); … … 169 169 */ 170 170 void 171 Rappture::VtkVis::writeTGAFile(const char *filename,172 173 174 175 171 VtkVis::writeTGAFile(const char *filename, 172 const unsigned char *imgData, 173 int width, int height, 174 int bytesPerPixel, 175 bool srcIsRGB) 176 176 { 177 177 TRACE("%s (%dx%d)\n", filename, width, height); -
trunk/packages/vizservers/vtkvis/TGAWriter.h
r3177 r3615 6 6 */ 7 7 8 #ifndef __RAPPTURE_VTKVIS_TGAWRITER_H__9 #define __RAPPTURE_VTKVIS_TGAWRITER_H__8 #ifndef VTKVIS_TGAWRITER_H 9 #define VTKVIS_TGAWRITER_H 10 10 11 11 #ifdef USE_THREADS … … 13 13 #endif 14 14 15 namespace Rappture {16 15 namespace VtkVis { 17 16 #ifdef USE_THREADS … … 31 30 int bytesPerPixel, bool srcIsRGB = false); 32 31 } 33 }34 32 35 33 #endif -
trunk/packages/vizservers/vtkvis/Trace.cpp
r3360 r3615 16 16 #include "Trace.h" 17 17 18 using namespace Rappture::VtkVis;18 using namespace VtkVis; 19 19 20 20 static std::ostringstream g_UserErrorString; … … 26 26 */ 27 27 void 28 Rappture::VtkVis::initLog()28 VtkVis::initLog() 29 29 { 30 30 openlog("vtkvis", LOG_CONS | LOG_PERROR | LOG_PID, LOG_USER); … … 35 35 */ 36 36 void 37 Rappture::VtkVis::closeLog()37 VtkVis::closeLog() 38 38 { 39 39 closelog(); … … 44 44 */ 45 45 void 46 Rappture::VtkVis::logMessage(int priority, const char *funcname,47 46 VtkVis::logMessage(int priority, const char *funcname, 47 const char *path, int lineNum, const char* fmt, ...) 48 48 { 49 49 char message[MSG_LEN + 1]; … … 74 74 */ 75 75 void 76 Rappture::VtkVis::logUserMessage(const char* fmt, ...)76 VtkVis::logUserMessage(const char* fmt, ...) 77 77 { 78 78 char message[MSG_LEN + 1]; … … 89 89 90 90 const char * 91 Rappture::VtkVis::getUserMessages()91 VtkVis::getUserMessages() 92 92 { 93 93 return g_UserErrorString.str().c_str(); … … 95 95 96 96 void 97 Rappture::VtkVis::clearUserMessages()97 VtkVis::clearUserMessages() 98 98 { 99 99 g_UserErrorString.str(std::string()); -
trunk/packages/vizservers/vtkvis/Trace.h
r3360 r3615 6 6 */ 7 7 8 #ifndef __TRACE_H__9 #define __TRACE_H__8 #ifndef VTKVIS_TRACE_H 9 #define VTKVIS_TRACE_H 10 10 11 11 #include <syslog.h> 12 12 13 namespace Rappture {14 13 namespace VtkVis { 15 14 … … 27 26 int lineNum, const char* format, ...); 28 27 29 #define ERROR(...) Rappture::VtkVis::logMessage(LOG_ERR, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)28 #define ERROR(...) VtkVis::logMessage(LOG_ERR, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__) 30 29 #ifdef WANT_TRACE 31 #define TRACE(...) Rappture::VtkVis::logMessage(LOG_DEBUG, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)30 #define TRACE(...) VtkVis::logMessage(LOG_DEBUG, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__) 32 31 #else 33 32 #define TRACE(...) 34 33 #endif /*WANT_TRACE*/ 35 #define WARN(...) Rappture::VtkVis::logMessage(LOG_WARNING, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)36 #define INFO(...) Rappture::VtkVis::logMessage(LOG_INFO, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)34 #define WARN(...) VtkVis::logMessage(LOG_WARNING, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__) 35 #define INFO(...) VtkVis::logMessage(LOG_INFO, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__) 37 36 38 #define USER_ERROR(...) Rappture::VtkVis::logUserMessage(__VA_ARGS__)37 #define USER_ERROR(...) VtkVis::logUserMessage(__VA_ARGS__) 39 38 40 }41 39 } 42 40 -
trunk/packages/vizservers/vtkvis/protocol.txt
r3542 r3615 186 186 resets to default. 187 187 188 clientinfo <list> 189 188 190 colormap add <colorMapName> <colorMap> <opacityMap> 189 191 colorMap = Tcl list of {value r g b} control points … … 195 197 196 198 dataset add <datasetName> data follows <nbytes> 197 dataset color <r> <g> <b> <?datasetName?>198 Set color of outline bounding box199 199 dataset delete <?datasetName?> 200 200 dataset getscalar world <x> <y> <z> <datasetName> … … 222 222 Returns a list of the loaded data sets 223 223 dataset opacity <val> <?datasetName?> 224 dataset outline <bool> <?datasetName?>225 Toggle wireframe outline of dataset's bounding box226 224 dataset scalar <scalarName> <?datasetName?> 227 225 Set the active scalar field to plot -
trunk/packages/vizservers/vtkvis/vtkRpCubeAxesActor.cpp
r3586 r3615 28 28 #include "vtkTextProperty.h" 29 29 #include "vtkViewport.h" 30 31 #include "Trace.h" 30 32 31 33 vtkStandardNewMacro(vtkRpCubeAxesActor); … … 2004 2006 customizedLabels = this->AxisLabels[axis]; 2005 2007 2008 //TRACE("sortedRange[0]: %g %g", sortedRange[0], this->FFix(sortedRange[0]*(1./major)) - sortedRange[0]*(1./major)); 2009 2006 2010 if (customizedLabels == NULL) 2007 2011 { … … 2058 2062 } 2059 2063 2064 //TRACE("range majorStart: %g major: %g", majorStart, major); 2065 2060 2066 double t; 2061 2067 t = (minorStart - sortedRange[0])/range; … … 2066 2072 minor *= scale; 2067 2073 major *= scale; 2074 2075 //TRACE("bounds majorStart: %g major: %g", majorStart, major); 2068 2076 2069 2077 // Set major start and delta for the corresponding cube axis
Note: See TracChangeset
for help on using the changeset viewer.