VTK
vtkRenderView.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkRenderView.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 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
39 #ifndef vtkRenderView_h
40 #define vtkRenderView_h
41 
42 #include "vtkViewsInfovisModule.h" // For export macro
43 #include "vtkRenderViewBase.h"
44 #include "vtkSmartPointer.h" // For SP ivars
45 
47 class vtkActor2D;
48 class vtkAlgorithmOutput;
49 class vtkArrayCalculator;
53 class vtkHoverWidget;
57 class vtkSelection;
58 class vtkTextProperty;
59 class vtkTexture;
60 class vtkTexturedActor2D;
62 
64 {
65 public:
66  static vtkRenderView* New();
68  void PrintSelf(ostream& os, vtkIndent indent);
69 
73  virtual void SetInteractor(vtkRenderWindowInteractor *interactor);
74 
76  virtual void SetInteractorStyle(vtkInteractorObserver* style);
77 
79  virtual vtkInteractorObserver* GetInteractorStyle();
80 
84  virtual void SetRenderWindow(vtkRenderWindow *win);
85 
86  //BTX
87  enum
88  {
91  INTERACTION_MODE_UNKNOWN
92  };
93  //ETX
94  void SetInteractionMode(int mode);
95  vtkGetMacro(InteractionMode, int);
96 
98 
101  virtual void SetInteractionModeTo2D()
102  { this->SetInteractionMode(INTERACTION_MODE_2D); }
103  virtual void SetInteractionModeTo3D()
104  { this->SetInteractionMode(INTERACTION_MODE_3D); }
106 
109  virtual void Render();
110 
112  virtual void ApplyViewTheme(vtkViewTheme* theme);
113 
115 
117  virtual void SetTransform(vtkAbstractTransform* transform);
118  vtkGetObjectMacro(Transform, vtkAbstractTransform);
120 
122 
123  virtual void SetDisplayHoverText(bool b);
124  vtkGetMacro(DisplayHoverText, bool);
125  vtkBooleanMacro(DisplayHoverText, bool);
127 
128  //BTX
129  enum {
130  SURFACE = 0,
131  FRUSTUM = 1
132  };
133  //ETX
134 
136 
140  vtkSetClampMacro(SelectionMode, int, 0, 1);
141  vtkGetMacro(SelectionMode, int);
142  void SetSelectionModeToSurface() { this->SetSelectionMode(SURFACE); }
143  void SetSelectionModeToFrustum() { this->SetSelectionMode(FRUSTUM); }
145 
149  virtual void AddLabels(vtkAlgorithmOutput* conn);
150 
152  virtual void RemoveLabels(vtkAlgorithmOutput* conn);
153 
155 
156  virtual void SetIconTexture(vtkTexture* texture);
157  vtkGetObjectMacro(IconTexture, vtkTexture);
159 
161 
162  vtkSetVector2Macro(IconSize, int);
163  vtkGetVector2Macro(IconSize, int);
165 
167 
170  vtkSetVector2Macro(DisplaySize, int);
171  int* GetDisplaySize();
172  void GetDisplaySize(int &dsx, int &dsy);
174 
175  //BTX
176  enum
177  {
179  ALL
180  };
181  //ETX
182 
184 
188  virtual void SetLabelPlacementMode(int mode);
189  virtual int GetLabelPlacementMode();
191  { this->SetLabelPlacementMode(NO_OVERLAP); }
193  { this->SetLabelPlacementMode(ALL); }
195 
196  //BTX
197  enum
198  {
200  QT
201  };
202  //ETX
203 
205 
207  virtual void SetLabelRenderMode(int mode);
208  virtual int GetLabelRenderMode();
210  { this->SetLabelRenderMode(FREETYPE); }
211  virtual void SetLabelRenderModeToQt()
212  { this->SetLabelRenderMode(QT); }
214 
216 
217  void SetRenderOnMouseMove(bool b);
218  vtkGetMacro(RenderOnMouseMove, bool);
219  vtkBooleanMacro(RenderOnMouseMove, bool);
220 protected:
221  vtkRenderView();
222  ~vtkRenderView();
224 
226 
229  virtual void ProcessEvents(vtkObject* caller, unsigned long eventId,
230  void* callData);
232 
234 
236  virtual void GenerateSelection(
237  void* callData, vtkSelection* selection);
239 
241  virtual void PrepareForRendering();
242 
244  virtual void UpdateHoverText();
245 
248  virtual void UpdateHoverWidgetState();
249 
252  void UpdatePickRender();
253 
261 
264  int IconSize[2];
265  int DisplaySize[2];
266 
269 
270  //BTX
277  //ETX
278 
279 private:
280  vtkRenderView(const vtkRenderView&); // Not implemented.
281  void operator=(const vtkRenderView&); // Not implemented.
282 };
283 
284 #endif
virtual void ApplyViewTheme(vtkViewTheme *vtkNotUsed(theme))
Definition: vtkView.h:125
abstract base class for most VTK objects
Definition: vtkObject.h:61
actor that draws 2D data with texture support
void SetSelectionModeToFrustum()
virtual void Render()
perform mathematical operations on data in field data arrays
virtual void SetRenderWindow(vtkRenderWindow *win)
a actor that draws 2D data
Definition: vtkActor2D.h:44
vtkSmartPointer< vtkBalloonRepresentation > Balloon
draw text labels at 2D dataset points
A node in a selection tree. Used to store selection results.
Definition: vtkSelection.h:44
virtual void SetLabelPlacementModeToAll()
virtual void SetInteractionModeTo2D()
A base view containing a renderer.
virtual void SetInteractor(vtkRenderWindowInteractor *)
Proxy object to connect input/output ports.
an abstract superclass for classes observing events invoked by vtkRenderWindowInteractor ...
void SetSelectionModeToSurface()
platform-independent render window interaction including picking and frame rate control.
Sets theme colors for a graphical view.
Definition: vtkViewTheme.h:47
virtual void ProcessEvents(vtkObject *caller, unsigned long eventId, void *callData)
vtkAbstractTransform * Transform
vtkSmartPointer< vtkLabelPlacementMapper > LabelPlacementMapper
a simple class to control print indentation
Definition: vtkIndent.h:38
superclass for all geometric transformations
virtual void SetLabelPlacementModeToNoOverlap()
handles properties associated with a texture map
Definition: vtkTexture.h:69
vtkSmartPointer< vtkHoverWidget > HoverWidget
virtual void SetLabelRenderModeToFreetype()
virtual void SetLabelRenderModeToQt()
void PrintSelf(ostream &os, vtkIndent indent)
bool InHoverTextRender
bool PickRenderNeedsUpdate
virtual void PrepareForRendering()
represent text properties.
transform points into different coordinate systems
represent the vtkBalloonWidget
vtkSmartPointer< vtkHardwareSelector > Selector
create a window for renderers to draw into
vtkSmartPointer< vtkRenderer > LabelRenderer
invoke a vtkTimerEvent when hovering
A view containing a renderer.
Definition: vtkRenderView.h:63
vtkSmartPointer< vtkTexturedActor2D > LabelActor
virtual void SetInteractionModeTo3D()
manager for OpenGL-based selection.
static vtkRenderViewBase * New()
bool RenderOnMouseMove
Places and renders non-overlapping labels.
draw vtkPolyData onto the image plane
#define VTKVIEWSINFOVIS_EXPORT
vtkTexture * IconTexture