source: trunk/packages/vizservers/vtkvis/RpVtkRenderer.h @ 2402

Last change on this file since 2402 was 2402, checked in by ldelgass, 13 years ago
  • Let graphics objects handle DataSet? cumulative range changes, track vectors as well as scalars, also supply cumulative ranges in setDataSet()
  • Be more consistent about naming enums and commands for vectors
  • Add constructor arguments to some graphics objects to speed initialization (eliminates some pipeline changes)
  • Apply a scale factor to glyphs based on cell sizes
  • Add line glyph shape
  • Don't delete ColorMaps? in use
  • Update graphics objects when a ColorMap? is edited
  • Property svn:eol-style set to native
File size: 22.2 KB
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/*
3 * Copyright (C) 2011, Purdue Research Foundation
4 *
5 * Author: Leif Delgass <ldelgass@purdue.edu>
6 */
7
8#ifndef __RAPPTURE_VTKVIS_RENDERER_H__
9#define __RAPPTURE_VTKVIS_RENDERER_H__
10
11#include <vtkSmartPointer.h>
12#include <vtkCubeAxesActor.h>
13#ifdef USE_CUSTOM_AXES
14#include <vtkRpCubeAxesActor2D.h>
15#else
16#include <vtkCubeAxesActor2D.h>
17#endif
18#include <vtkScalarBarActor.h>
19#include <vtkRenderer.h>
20#include <vtkRenderWindow.h>
21#include <vtkUnsignedCharArray.h>
22
23#include <string>
24#include <vector>
25#include <tr1/unordered_map>
26
27#include "ColorMap.h"
28#include "RpVtkDataSet.h"
29#include "RpContour2D.h"
30#include "RpContour3D.h"
31#include "RpGlyphs.h"
32#include "RpHeightMap.h"
33#include "RpLIC.h"
34#include "RpMolecule.h"
35#include "RpPolyData.h"
36#include "RpPseudoColor.h"
37#include "RpStreamlines.h"
38#include "RpVolume.h"
39#include "Trace.h"
40
41// Controls if TGA format is sent to client
42//#define RENDER_TARGA
43#define TARGA_BYTES_PER_PIXEL 3
44
45namespace Rappture {
46namespace VtkVis {
47
48/**
49 * \brief VTK Renderer
50 */
51class Renderer
52{
53public:
54    Renderer();
55    virtual ~Renderer();
56
57    enum Axis {
58        X_AXIS,
59        Y_AXIS,
60        Z_AXIS
61    };
62
63    enum AxesFlyMode {
64        FLY_OUTER_EDGES = 0,
65        FLY_CLOSEST_TRIAD,
66        FLY_FURTHEST_TRIAD,
67        FLY_STATIC_EDGES,
68        FLY_STATIC_TRIAD
69    };
70
71    enum AxesTickPosition {
72        TICKS_INSIDE,
73        TICKS_OUTSIDE,
74        TICKS_BOTH
75    };
76
77    enum CameraMode {
78        PERSPECTIVE,
79        ORTHO,
80        IMAGE
81    };
82
83    typedef std::string DataSetId;
84    typedef std::string ColorMapId;
85    typedef std::tr1::unordered_map<DataSetId, DataSet *> DataSetHashmap;
86    typedef std::tr1::unordered_map<ColorMapId, ColorMap *> ColorMapHashmap;
87    typedef std::tr1::unordered_map<DataSetId, Contour2D *> Contour2DHashmap;
88    typedef std::tr1::unordered_map<DataSetId, Contour3D *> Contour3DHashmap;
89    typedef std::tr1::unordered_map<DataSetId, Glyphs *> GlyphsHashmap;
90    typedef std::tr1::unordered_map<DataSetId, HeightMap *> HeightMapHashmap;
91    typedef std::tr1::unordered_map<DataSetId, LIC *> LICHashmap;
92    typedef std::tr1::unordered_map<DataSetId, Molecule *> MoleculeHashmap;
93    typedef std::tr1::unordered_map<DataSetId, PolyData *> PolyDataHashmap;
94    typedef std::tr1::unordered_map<DataSetId, PseudoColor *> PseudoColorHashmap;
95    typedef std::tr1::unordered_map<DataSetId, Streamlines *> StreamlinesHashmap;
96    typedef std::tr1::unordered_map<DataSetId, Volume *> VolumeHashmap;
97
98    // Data sets
99
100    void addDataSet(const DataSetId& id);
101
102    void deleteDataSet(const DataSetId& id);
103
104    DataSet *getDataSet(const DataSetId& id);
105
106    bool setData(const DataSetId& id, char *data, int nbytes);
107
108    bool setDataFile(const DataSetId& id, const char *filename);
109
110    bool setDataSetActiveScalars(const DataSetId& id, const char *scalarName);
111
112    bool setDataSetActiveVectors(const DataSetId& id, const char *vectorName);
113
114    double getDataValueAtPixel(const DataSetId& id, int x, int y);
115
116    double getDataValue(const DataSetId& id, double x, double y, double z);
117
118    void setOpacity(const DataSetId& id, double opacity);
119
120    void setVisibility(const DataSetId& id, bool state);
121
122    void setUseCumulativeDataRange(bool state, bool onlyVisible = false);
123
124    // Render window
125
126    /// Get the VTK render window object this Renderer uses
127    vtkRenderWindow *getRenderWindow()
128    {
129        return _renderWindow;
130    }
131
132    void setWindowSize(int width, int height);
133
134    int getWindowWidth() const;
135
136    int getWindowHeight() const;
137
138    // Camera controls
139
140    void setViewAngle(int height);
141
142    void setCameraMode(CameraMode mode);
143
144    CameraMode getCameraMode() const;
145
146    void resetCamera(bool resetOrientation = true);
147
148    void resetCameraClippingRange();
149
150    void setCameraZoomRegion(double x, double y, double width, double height);
151
152    void getCameraZoomRegion(double xywh[4]) const;
153
154    void getScreenWorldCoords(double xywh[4]) const;
155
156    void rotateCamera(double yaw, double pitch, double roll);
157
158    void setCameraOrientation(const double quat[4], bool absolute = true);
159
160    void panCamera(double x, double y, bool absolute = true);
161
162    void zoomCamera(double z, bool absolute = true);
163
164    void setCameraOrientationAndPosition(const double position[3],
165                                         const double focalPoint[3],
166                                         const double viewUp[3]);
167
168    void getCameraOrientationAndPosition(double position[3],
169                                         double focalPoint[3],
170                                         double viewUp[3]);
171
172    // Rendering an image
173
174    void setBackgroundColor(float color[3]);
175
176    void showBounds(bool state);
177
178    void setClipPlane(Axis axis, double ratio, int direction);
179
180    void setUseTwoSidedLighting(bool state);
181
182    void setUseDepthPeeling(bool state);
183
184    void eventuallyRender();
185
186    bool render();
187
188    void getRenderedFrame(vtkUnsignedCharArray *imgData);
189
190    // Axes
191
192    void setAxesFlyMode(AxesFlyMode mode);
193
194    void setAxesVisibility(bool state);
195
196    void setAxesGridVisibility(bool state);
197
198    void setAxesLabelVisibility(bool state);
199
200    void setAxesTickVisibility(bool state);
201
202    void setAxesTickPosition(AxesTickPosition pos);
203
204    void setAxesColor(double color[3]);
205
206    void setAxisVisibility(Axis axis, bool state);
207
208    void setAxisGridVisibility(Axis axis, bool state);
209
210    void setAxisLabelVisibility(Axis axis, bool state);
211
212    void setAxisTickVisibility(Axis axis, bool state);
213
214    void setAxisTitle(Axis axis, const char *title);
215
216    void setAxisUnits(Axis axis, const char *units);
217
218    // Colormaps
219
220    void addColorMap(const ColorMapId& id, ColorMap *colorMap);
221
222    void deleteColorMap(const ColorMapId& id);
223
224    ColorMap *getColorMap(const ColorMapId& id);
225
226    bool renderColorMap(const ColorMapId& id,
227                        const DataSetId& dataSetID,
228                        const char *title,
229                        int width, int height,
230                        vtkUnsignedCharArray *imgData);
231
232    // 2D Contour plots
233
234    void addContour2D(const DataSetId& id, int numContours);
235
236    void addContour2D(const DataSetId& id, const std::vector<double>& contours);
237
238    void deleteContour2D(const DataSetId& id);
239
240    Contour2D *getContour2D(const DataSetId& id);
241
242    void setContour2DTransform(const DataSetId& id, vtkMatrix4x4 *trans);
243
244    void setContour2DOrientation(const DataSetId& id, double quat[4]);
245
246    void setContour2DOrientation(const DataSetId& id, double angle, double axis[3]);
247
248    void setContour2DPosition(const DataSetId& id, double pos[3]);
249
250    void setContour2DScale(const DataSetId& id, double scale[3]);
251
252    void setContour2DEdgeColor(const DataSetId& id, float color[3]);
253
254    void setContour2DEdgeWidth(const DataSetId& id, float edgeWidth);
255
256    void setContour2DLighting(const DataSetId& id, bool state);
257   
258    void setContour2DOpacity(const DataSetId& id, double opacity);
259
260    void setContour2DVisibility(const DataSetId& id, bool state);
261
262    void setContour2DContours(const DataSetId& id, int numContours);
263
264    void setContour2DContourList(const DataSetId& id, const std::vector<double>& contours);
265
266    // 3D Contour (isosurface) plots
267
268    void addContour3D(const DataSetId& id, int numContours);
269
270    void addContour3D(const DataSetId& id, const std::vector<double>& contours);
271
272    void deleteContour3D(const DataSetId& id);
273
274    Contour3D *getContour3D(const DataSetId& id);
275
276    void setContour3DTransform(const DataSetId& id, vtkMatrix4x4 *trans);
277
278    void setContour3DOrientation(const DataSetId& id, double quat[4]);
279
280    void setContour3DOrientation(const DataSetId& id, double angle, double axis[3]);
281
282    void setContour3DPosition(const DataSetId& id, double pos[3]);
283
284    void setContour3DScale(const DataSetId& id, double scale[3]);
285
286    void setContour3DColor(const DataSetId& id, float color[3]);
287
288    void setContour3DEdgeVisibility(const DataSetId& id, bool state);
289
290    void setContour3DEdgeColor(const DataSetId& id, float color[3]);
291
292    void setContour3DEdgeWidth(const DataSetId& id, float edgeWidth);
293
294    void setContour3DLighting(const DataSetId& id, bool state);
295
296    void setContour3DOpacity(const DataSetId& id, double opacity);
297
298    void setContour3DVisibility(const DataSetId& id, bool state);
299
300    void setContour3DWireframe(const DataSetId& id, bool state);
301
302    void setContour3DContours(const DataSetId& id, int numContours);
303
304    void setContour3DContourList(const DataSetId& id, const std::vector<double>& contours);
305
306    void setContour3DColorMap(const DataSetId& id, const ColorMapId& colorMapId);
307
308    // Glyphs
309
310    void addGlyphs(const DataSetId& id, Glyphs::GlyphShape shape);
311
312    void deleteGlyphs(const DataSetId& id);
313
314    Glyphs *getGlyphs(const DataSetId& id);
315
316    void setGlyphsTransform(const DataSetId& id, vtkMatrix4x4 *trans);
317
318    void setGlyphsOrientation(const DataSetId& id, double quat[4]);
319
320    void setGlyphsOrientation(const DataSetId& id, double angle, double axis[3]);
321
322    void setGlyphsPosition(const DataSetId& id, double pos[3]);
323
324    void setGlyphsScale(const DataSetId& id, double scale[3]);
325
326    void setGlyphsColor(const DataSetId& id, float color[3]);
327
328    void setGlyphsEdgeVisibility(const DataSetId& id, bool state);
329
330    void setGlyphsEdgeColor(const DataSetId& id, float color[3]);
331
332    void setGlyphsEdgeWidth(const DataSetId& id, float edgeWidth);
333
334    void setGlyphsLighting(const DataSetId& id, bool state);
335
336    void setGlyphsOpacity(const DataSetId& id, double opacity);
337
338    void setGlyphsVisibility(const DataSetId& id, bool state);
339
340    void setGlyphsWireframe(const DataSetId& id, bool state);
341
342    void setGlyphsColorMap(const DataSetId& id, const ColorMapId& colorMapId);
343
344    void setGlyphsShape(const DataSetId& id, Glyphs::GlyphShape shape);
345
346    void setGlyphsColorMode(const DataSetId& id, Glyphs::ColorMode mode);
347
348    void setGlyphsScalingMode(const DataSetId& id, Glyphs::ScalingMode mode);
349
350    void setGlyphsScaleFactor(const DataSetId& id, double scale);
351
352    // Height maps
353
354    void addHeightMap(const DataSetId& id, int numContours);
355
356    void addHeightMap(const DataSetId& id, const std::vector<double>& contours);
357
358    void deleteHeightMap(const DataSetId& id);
359
360    HeightMap *getHeightMap(const DataSetId& id);
361
362    void setHeightMapTransform(const DataSetId& id, vtkMatrix4x4 *trans);
363
364    void setHeightMapOrientation(const DataSetId& id, double quat[4]);
365
366    void setHeightMapOrientation(const DataSetId& id, double angle, double axis[3]);
367
368    void setHeightMapPosition(const DataSetId& id, double pos[3]);
369
370    void setHeightMapScale(const DataSetId& id, double scale[3]);
371   
372    void setHeightMapEdgeVisibility(const DataSetId& id, bool state);
373
374    void setHeightMapEdgeColor(const DataSetId& id, float color[3]);
375
376    void setHeightMapEdgeWidth(const DataSetId& id, float edgeWidth);
377
378    void setHeightMapLighting(const DataSetId& id, bool state);
379
380    void setHeightMapOpacity(const DataSetId& id, double opacity);
381
382    void setHeightMapVisibility(const DataSetId& id, bool state);
383
384    void setHeightMapVolumeSlice(const DataSetId& id, HeightMap::Axis axis, double ratio);
385
386    void setHeightMapHeightScale(const DataSetId& id, double scale);
387
388    void setHeightMapColorMap(const DataSetId& id, const ColorMapId& colorMapId);
389
390    void setHeightMapContours(const DataSetId& id, int numContours);
391
392    void setHeightMapContourList(const DataSetId& id, const std::vector<double>& contours);
393
394    void setHeightMapContourVisibility(const DataSetId& id, bool state);
395
396    void setHeightMapContourEdgeColor(const DataSetId& id, float color[3]);
397
398    void setHeightMapContourEdgeWidth(const DataSetId& id, float edgeWidth);
399
400    // LIC plots
401
402    void addLIC(const DataSetId& id);
403   
404    void deleteLIC(const DataSetId& id);
405
406    LIC *getLIC(const DataSetId& id);
407
408    void setLICTransform(const DataSetId& id, vtkMatrix4x4 *trans);
409
410    void setLICOrientation(const DataSetId& id, double quat[4]);
411
412    void setLICOrientation(const DataSetId& id, double angle, double axis[3]);
413
414    void setLICPosition(const DataSetId& id, double pos[3]);
415
416    void setLICScale(const DataSetId& id, double scale[3]);
417
418    void setLICEdgeVisibility(const DataSetId& id, bool state);
419   
420    void setLICEdgeColor(const DataSetId& id, float color[3]);
421
422    void setLICEdgeWidth(const DataSetId& id, float edgeWidth);
423
424    void setLICLighting(const DataSetId& id, bool state);
425
426    void setLICOpacity(const DataSetId& id, double opacity);
427
428    void setLICVisibility(const DataSetId& id, bool state);
429
430    void setLICVolumeSlice(const DataSetId& id, LIC::Axis axis, double ratio);
431
432    void setLICColorMap(const DataSetId& id, const ColorMapId& colorMapId);
433
434    // Molecules
435
436    void addMolecule(const DataSetId& id);
437   
438    void deleteMolecule(const DataSetId& id);
439
440    Molecule *getMolecule(const DataSetId& id);
441
442    void setMoleculeTransform(const DataSetId& id, vtkMatrix4x4 *trans);
443
444    void setMoleculeOrientation(const DataSetId& id, double quat[4]);
445
446    void setMoleculeOrientation(const DataSetId& id, double angle, double axis[3]);
447
448    void setMoleculePosition(const DataSetId& id, double pos[3]);
449
450    void setMoleculeScale(const DataSetId& id, double scale[3]);
451   
452    void setMoleculeEdgeVisibility(const DataSetId& id, bool state);
453
454    void setMoleculeEdgeColor(const DataSetId& id, float color[3]);
455
456    void setMoleculeEdgeWidth(const DataSetId& id, float edgeWidth);
457
458    void setMoleculeLighting(const DataSetId& id, bool state);
459
460    void setMoleculeOpacity(const DataSetId& id, double opacity);
461
462    void setMoleculeVisibility(const DataSetId& id, bool state);
463
464    void setMoleculeWireframe(const DataSetId& id, bool state);
465
466    void setMoleculeColorMap(const DataSetId& id, const ColorMapId& colorMapId);
467
468    void setMoleculeAtomScaling(const DataSetId& id, Molecule::AtomScaling scaling);
469
470    void setMoleculeAtomVisibility(const DataSetId& id, bool state);
471
472    void setMoleculeBondVisibility(const DataSetId& id, bool state);
473
474    // PolyData Meshes
475
476    void addPolyData(const DataSetId& id);
477   
478    void deletePolyData(const DataSetId& id);
479
480    PolyData *getPolyData(const DataSetId& id);
481
482    void setPolyDataTransform(const DataSetId& id, vtkMatrix4x4 *trans);
483
484    void setPolyDataOrientation(const DataSetId& id, double quat[4]);
485
486    void setPolyDataOrientation(const DataSetId& id, double angle, double axis[3]);
487
488    void setPolyDataPosition(const DataSetId& id, double pos[3]);
489
490    void setPolyDataScale(const DataSetId& id, double scale[3]);
491
492    void setPolyDataColor(const DataSetId& id, float color[3]);
493
494    void setPolyDataEdgeVisibility(const DataSetId& id, bool state);
495
496    void setPolyDataEdgeColor(const DataSetId& id, float color[3]);
497
498    void setPolyDataEdgeWidth(const DataSetId& id, float edgeWidth);
499
500    void setPolyDataLighting(const DataSetId& id, bool state);
501
502    void setPolyDataOpacity(const DataSetId& id, double opacity);
503
504    void setPolyDataVisibility(const DataSetId& id, bool state);
505
506    void setPolyDataWireframe(const DataSetId& id, bool state);
507
508
509    // Color-mapped surfaces
510
511    void addPseudoColor(const DataSetId& id);
512
513    void deletePseudoColor(const DataSetId& id);
514
515    PseudoColor *getPseudoColor(const DataSetId& id);
516
517    void setPseudoColorTransform(const DataSetId& id, vtkMatrix4x4 *trans);
518
519    void setPseudoColorOrientation(const DataSetId& id, double quat[4]);
520
521    void setPseudoColorOrientation(const DataSetId& id, double angle, double axis[3]);
522
523    void setPseudoColorPosition(const DataSetId& id, double pos[3]);
524
525    void setPseudoColorScale(const DataSetId& id, double scale[3]);
526
527    void setPseudoColorEdgeVisibility(const DataSetId& id, bool state);
528
529    void setPseudoColorEdgeColor(const DataSetId& id, float color[3]);
530
531    void setPseudoColorEdgeWidth(const DataSetId& id, float edgeWidth);
532
533    void setPseudoColorLighting(const DataSetId& id, bool state);
534   
535    void setPseudoColorOpacity(const DataSetId& id, double opacity);
536
537    void setPseudoColorVisibility(const DataSetId& id, bool state);
538
539    void setPseudoColorWireframe(const DataSetId& id, bool state);
540
541    void setPseudoColorColorMap(const DataSetId& id, const ColorMapId& colorMapId);
542
543    // Streamlines
544
545    void addStreamlines(const DataSetId& id);
546
547    void deleteStreamlines(const DataSetId& id);
548
549    Streamlines *getStreamlines(const DataSetId& id);
550
551    void setStreamlinesTransform(const DataSetId& id, vtkMatrix4x4 *trans);
552
553    void setStreamlinesOrientation(const DataSetId& id, double quat[4]);
554
555    void setStreamlinesOrientation(const DataSetId& id, double angle, double axis[3]);
556
557    void setStreamlinesPosition(const DataSetId& id, double pos[3]);
558
559    void setStreamlinesScale(const DataSetId& id, double scale[3]);
560
561    void setStreamlinesColor(const DataSetId& id, float color[3]);
562
563    void setStreamlinesEdgeVisibility(const DataSetId& id, bool state);
564
565    void setStreamlinesEdgeColor(const DataSetId& id, float color[3]);
566
567    void setStreamlinesEdgeWidth(const DataSetId& id, float edgeWidth);
568
569    void setStreamlinesLighting(const DataSetId& id, bool state);
570
571    void setStreamlinesOpacity(const DataSetId& id, double opacity);
572
573    void setStreamlinesVisibility(const DataSetId& id, bool state);
574
575    void setStreamlinesSeedToRandomPoints(const DataSetId& id, int numPoints);
576
577    void setStreamlinesSeedToRake(const DataSetId& id,
578                                  double start[3], double end[3],
579                                  int numPoints);
580
581    void setStreamlinesSeedToDisk(const DataSetId& id,
582                                  double center[3], double normal[3],
583                                  double radius, double innerRadius,
584                                  int numPoints);
585
586    void setStreamlinesSeedToPolygon(const DataSetId& id,
587                                     double center[3], double normal[3],
588                                     double angle, double radius,
589                                     int numSides);
590
591    void setStreamlinesSeedToFilledPolygon(const DataSetId& id,
592                                           double center[3], double normal[3],
593                                           double angle, double radius,
594                                           int numSides, int numPoints);
595
596    void setStreamlinesLength(const DataSetId& id, double length);
597
598    void setStreamlinesTypeToLines(const DataSetId& id);
599
600    void setStreamlinesTypeToTubes(const DataSetId& id, int numSides, double radius);
601
602    void setStreamlinesTypeToRibbons(const DataSetId& id, double width, double angle);
603
604    void setStreamlinesSeedVisibility(const DataSetId& id, bool state);
605
606    void setStreamlinesColorMode(const DataSetId& id, Streamlines::ColorMode mode);
607
608    void setStreamlinesColorMap(const DataSetId& id, const ColorMapId& colorMapId);
609
610    void setStreamlinesSeedColor(const DataSetId& id, float color[3]);
611
612    // Volumes
613
614    void addVolume(const DataSetId& id);
615
616    void deleteVolume(const DataSetId& id);
617
618    Volume *getVolume(const DataSetId& id);
619
620    void setVolumeTransform(const DataSetId& id, vtkMatrix4x4 *trans);
621
622    void setVolumeOrientation(const DataSetId& id, double quat[4]);
623
624    void setVolumeOrientation(const DataSetId& id, double angle, double axis[3]);
625
626    void setVolumePosition(const DataSetId& id, double pos[3]);
627
628    void setVolumeScale(const DataSetId& id, double scale[3]);
629
630    void setVolumeAmbient(const DataSetId& id, double coeff);
631
632    void setVolumeDiffuse(const DataSetId& id, double coeff);
633
634    void setVolumeSpecular(const DataSetId& id, double coeff, double power);
635
636    void setVolumeLighting(const DataSetId& id, bool state);
637   
638    void setVolumeOpacity(const DataSetId& id, double opacity);
639
640    void setVolumeVisibility(const DataSetId& id, bool state);
641
642    void setVolumeColorMap(const DataSetId& id, const ColorMapId& colorMapId);
643
644private:
645    static void printCameraInfo(vtkCamera *camera);
646    static inline double min2(double a, double b)
647    {
648        return ((a < b) ? a : b);
649    }
650    static inline double max2(double a, double b)
651    {
652        return ((a > b) ? a : b);
653    }
654    static void mergeBounds(double *boundsDest, const double *bounds1, const double *bounds2);
655
656    void collectBounds(double *bounds, bool onlyVisible);
657
658    void collectDataRanges();
659
660    void collectScalarRanges(double *range, bool onlyVisible);
661
662    void collectVectorMagnitudeRanges(double *range, bool onlyVisible);
663
664    void collectVectorComponentRanges(double *range, int component, bool onlyVisible);
665
666    void updateRanges();
667
668    void updateColorMap(ColorMap *cmap);
669
670    bool colorMapUsed(ColorMap *cmap);
671
672    void setCameraFromMatrix(vtkCamera *camera, vtkMatrix4x4 &mat);
673
674    void computeDisplayToWorld(double x, double y, double z, double worldPt[4]);
675
676    void computeWorldToDisplay(double x, double y, double z, double displayPt[3]);
677
678    void computeScreenWorldCoords();
679
680    void initCamera();
681    void initAxes();
682    void resetAxes(double bounds[6] = NULL);
683    void setCameraClippingPlanes();
684
685    bool _needsRedraw;
686    int _windowWidth, _windowHeight;
687    double _imgWorldOrigin[2];
688    double _imgWorldDims[2];
689    double _screenWorldCoords[4];
690    double _cameraOrientation[4];
691    double _cameraZoomRatio;
692    double _cameraPan[2];
693    float _bgColor[3];
694    bool _useCumulativeRange;
695    bool _cumulativeRangeOnlyVisible;
696    double _cumulativeScalarRange[2];
697    double _cumulativeVectorMagnitudeRange[2];
698    double _cumulativeVectorComponentRange[3][2];
699
700    ColorMapHashmap _colorMaps;
701    DataSetHashmap _dataSets;
702    Contour2DHashmap _contour2Ds;
703    Contour3DHashmap _contour3Ds;
704    GlyphsHashmap _glyphs;
705    HeightMapHashmap _heightMaps;
706    LICHashmap _lics;
707    MoleculeHashmap _molecules;
708    PolyDataHashmap _polyDatas;
709    PseudoColorHashmap _pseudoColors;
710    StreamlinesHashmap _streamlines;
711    VolumeHashmap _volumes;
712
713    CameraMode _cameraMode;
714
715    vtkSmartPointer<vtkPlane> _cameraClipPlanes[4];
716    vtkSmartPointer<vtkPlane> _userClipPlanes[6];
717    vtkSmartPointer<vtkPlaneCollection> _activeClipPlanes;
718    vtkSmartPointer<vtkCubeAxesActor> _cubeAxesActor; // For 3D view
719#ifdef USE_CUSTOM_AXES
720    vtkSmartPointer<vtkRpCubeAxesActor2D> _cubeAxesActor2D; // For 2D view
721#else
722    vtkSmartPointer<vtkCubeAxesActor2D> _cubeAxesActor2D; // For 2D view
723#endif
724    vtkSmartPointer<vtkScalarBarActor> _scalarBarActor;
725    vtkSmartPointer<vtkRenderer> _renderer;
726    vtkSmartPointer<vtkRenderer> _legendRenderer;
727    vtkSmartPointer<vtkRenderWindow> _renderWindow;
728    vtkSmartPointer<vtkRenderWindow> _legendRenderWindow;
729};
730
731}
732}
733
734#endif
Note: See TracBrowser for help on using the repository browser.