ParaView
vtkScatterPlotPainter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkScatterPlotPainter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
28 #ifndef vtkScatterPlotPainter_h
29 #define vtkScatterPlotPainter_h
30 
31 #include "vtkPVVTKExtensionsDefaultModule.h" //needed for exports
32 #include "vtkPainter.h"
33 #include "vtkWeakPointer.h" // needed for vtkWeakPointer.
34 
35 class vtkCollection;
36 class vtkDataArray;
37 class vtkInformationDoubleKey;
38 class vtkPolyData;
39 class vtkScalarsToColors;
40 class vtkScalarsToColorsPainter;
41 class vtkUnsignedCharArray;
42 
43 class VTKPVVTKEXTENSIONSDEFAULT_EXPORT vtkScatterPlotPainter : public vtkPainter
44 {
45 public:
46  static vtkScatterPlotPainter* New();
47  vtkTypeMacro(vtkScatterPlotPainter, vtkPainter);
48  void PrintSelf(ostream& os, vtkIndent indent);
49  virtual vtkMTimeType GetMTime();
50 
52 
55  vtkDataArray* GetArray(int idx);
56  vtkDataArray* GetArray(int idx, vtkDataSet* input);
57  int GetArrayComponent(int idx);
59 
60  static vtkInformationIntegerKey* THREED_MODE();
61  static vtkInformationIntegerKey* COLORIZE();
62  static vtkInformationIntegerKey* GLYPH_MODE();
63  static vtkInformationIntegerKey* SCALING_ARRAY_MODE();
64  static vtkInformationIntegerKey* SCALE_MODE();
65  static vtkInformationDoubleKey* SCALE_FACTOR();
66  static vtkInformationIntegerKey* ORIENTATION_MODE();
67  static vtkInformationIntegerKey* NESTED_DISPLAY_LISTS();
68  static vtkInformationIntegerKey* PARALLEL_TO_CAMERA();
69 
70  virtual void SetSourceGlyphMappers(vtkCollection*);
71  vtkGetObjectMacro(SourceGlyphMappers, vtkCollection);
72 
73 protected:
75 
80  vtkSetMacro(ThreeDMode, int);
81  vtkGetMacro(ThreeDMode, int);
82  vtkBooleanMacro(ThreeDMode, int);
84 
86 
91  vtkSetMacro(Colorize, int);
92  vtkGetMacro(Colorize, int);
93  vtkBooleanMacro(Colorize, int);
95 
97 
103  vtkSetMacro(GlyphMode, int);
104  vtkGetMacro(GlyphMode, int);
105  // vtkBooleanMacro(GlyphMode,int);
107 
109 
113  vtkSetMacro(ScalingArrayMode, int);
114  vtkGetMacro(ScalingArrayMode, int);
116 
118 
122  vtkSetMacro(ScaleMode, int);
123  vtkGetMacro(ScaleMode, int);
125 
127 
131  vtkSetMacro(ScaleFactor, double);
132  vtkGetMacro(ScaleFactor, double);
134 
135  vtkSetMacro(OrientationMode, int);
136  vtkGetMacro(OrientationMode, int);
137 
139 
147  vtkSetMacro(NestedDisplayLists, int);
148  vtkGetMacro(NestedDisplayLists, int);
149  vtkBooleanMacro(NestedDisplayLists, int);
151 
152  vtkSetMacro(ParallelToCamera, int);
153  vtkGetMacro(ParallelToCamera, int);
154  vtkBooleanMacro(ParallelToCamera, int);
155 
156  virtual void SetLookupTable(vtkScalarsToColors*);
157  vtkGetObjectMacro(LookupTable, vtkScalarsToColors);
158 
162  vtkPolyData* GetGlyphSource(int id = 0);
163 
164 public:
170  virtual void ReleaseGraphicsResources(vtkWindow* window);
171 
172  virtual void UpdateBounds(double bounds[6]);
173  vtkInformation* GetInputArrayInformation(int idx);
174 
175 protected:
182  virtual void RenderInternal(
183  vtkRenderer* renderer, vtkActor* actor, unsigned long typeflags, bool forceCompileOnly);
184 
185 protected:
187  virtual ~vtkScatterPlotPainter();
188 
190 
193  virtual void ReportReferences(vtkGarbageCollector* collector);
194  virtual void ProcessInformation(vtkInformation* info);
196 
200  virtual void UpdatePainterInformation();
201 
205  vtkUnsignedCharArray* GetColors();
206 
207  virtual void PrepareForRendering(vtkRenderer* renderer, vtkActor* actor);
208  void RenderPoints(
209  vtkRenderer* renderer, vtkActor* actor, unsigned long typeflags, bool forceCompileOnly);
210  void RenderGlyphs(
211  vtkRenderer* renderer, vtkActor* actor, unsigned long typeflags, bool forceCompileOnly);
212 
216  void ReleaseDisplayList();
217 
219  int Colorize;
221 
222  double ScaleFactor; // Scale factor to use to scale geometry
223  int ScaleMode; // Scale by scalar value or vector magnitude
226  int NestedDisplayLists; // boolean
227  unsigned int DisplayListId; // GLuint
229 
230  // vtkScatterPlotPainterArray* SourceGlyphMappers; // array of mappers
231  vtkCollection* SourceGlyphMappers; // array of mappers
232 
233  vtkScalarsToColorsPainter* ScalarsToColorsPainter;
235  vtkTimeStamp BuildTime;
236 
237  unsigned int SelectionColorId;
239 
240  vtkScalarsToColors* LookupTable;
241 
242 private:
243  vtkScatterPlotPainter(const vtkScatterPlotPainter&) VTK_DELETE_FUNCTION;
244  void operator=(const vtkScatterPlotPainter&) VTK_DELETE_FUNCTION;
245 };
246 
247 #endif
vtkScalarsToColors * LookupTable
vtkScalarsToColorsPainter * ScalarsToColorsPainter
vtkCollection * SourceGlyphMappers