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-------------------------------------------------------------------------*/
37#ifndef vtkRenderView_h
38#define vtkRenderView_h
39
40#include "vtkViewsInfovisModule.h" // For export macro
41#include "vtkRenderViewBase.h"
42#include "vtkSmartPointer.h" // For SP ivars
43
45class vtkActor2D;
51class vtkHoverWidget;
55class vtkSelection;
56class vtkTextProperty;
57class vtkTexture;
60
61class VTKVIEWSINFOVIS_EXPORT vtkRenderView : public vtkRenderViewBase
62{
63public:
64 static vtkRenderView* New();
66 void PrintSelf(ostream& os, vtkIndent indent);
67
73 virtual void SetInteractor(vtkRenderWindowInteractor *interactor);
74
79
84
90 virtual void SetRenderWindow(vtkRenderWindow *win);
91
92 enum
93 {
96 INTERACTION_MODE_UNKNOWN
97 };
98
100 vtkGetMacro(InteractionMode, int);
101
108 { this->SetInteractionMode(INTERACTION_MODE_2D); }
110 { this->SetInteractionMode(INTERACTION_MODE_3D); }
111
116 virtual void Render();
117
121 virtual void ApplyViewTheme(vtkViewTheme* theme);
122
124
128 virtual void SetTransform(vtkAbstractTransform* transform);
129 vtkGetObjectMacro(Transform, vtkAbstractTransform);
131
133
136 virtual void SetDisplayHoverText(bool b);
137 vtkGetMacro(DisplayHoverText, bool);
138 vtkBooleanMacro(DisplayHoverText, bool);
140
141 enum {
142 SURFACE = 0,
143 FRUSTUM = 1
144 };
145
147
154 vtkSetClampMacro(SelectionMode, int, 0, 1);
155 vtkGetMacro(SelectionMode, int);
156 void SetSelectionModeToSurface() { this->SetSelectionMode(SURFACE); }
157 void SetSelectionModeToFrustum() { this->SetSelectionMode(FRUSTUM); }
159
165 virtual void AddLabels(vtkAlgorithmOutput* conn);
166
170 virtual void RemoveLabels(vtkAlgorithmOutput* conn);
171
173
176 virtual void SetIconTexture(vtkTexture* texture);
177 vtkGetObjectMacro(IconTexture, vtkTexture);
179
181
184 vtkSetVector2Macro(IconSize, int);
185 vtkGetVector2Macro(IconSize, int);
187
189
193 vtkSetVector2Macro(DisplaySize, int);
195 void GetDisplaySize(int &dsx, int &dsy);
197
198 enum
199 {
201 ALL
202 };
203
205
212 virtual void SetLabelPlacementMode(int mode);
215 { this->SetLabelPlacementMode(NO_OVERLAP); }
217 { this->SetLabelPlacementMode(ALL); }
219
220 enum
221 {
223 QT
224 };
225
227
232 virtual void SetLabelRenderMode(int mode);
233 virtual int GetLabelRenderMode();
235 { this->SetLabelRenderMode(FREETYPE); }
237 { this->SetLabelRenderMode(QT); }
239
241
245 vtkGetMacro(RenderOnMouseMove, bool);
246 vtkBooleanMacro(RenderOnMouseMove, bool);
248
249protected:
252
258 virtual void ProcessEvents(vtkObject* caller, unsigned long eventId,
259 void* callData);
260
264 virtual void GenerateSelection(
265 void* callData, vtkSelection* selection);
266
270 virtual void PrepareForRendering();
271
275 virtual void UpdateHoverText();
276
282
288
296
299 int IconSize[2];
300 int DisplaySize[2];
301
304
311
312private:
313 vtkRenderView(const vtkRenderView&) VTK_DELETE_FUNCTION;
314 void operator=(const vtkRenderView&) VTK_DELETE_FUNCTION;
315};
316
317#endif
superclass for all geometric transformations
a actor that draws 2D data
Definition: vtkActor2D.h:46
Proxy object to connect input/output ports.
perform mathematical operations on data in field data arrays
represent the vtkBalloonWidget
draw text labels at 2D dataset points
manager for OpenGL-based selection.
invoke a vtkTimerEvent when hovering
a simple class to control print indentation
Definition: vtkIndent.h:40
an abstract superclass for classes observing events invoked by vtkRenderWindowInteractor
Places and renders non-overlapping labels.
abstract base class for most VTK objects
Definition: vtkObject.h:60
draw vtkPolyData onto the image plane
A base view containing a renderer.
A view containing a renderer.
Definition: vtkRenderView.h:62
vtkTexture * IconTexture
virtual void SetInteractionModeTo3D()
virtual void SetLabelRenderModeToFreetype()
virtual void UpdateHoverWidgetState()
Enable or disable hovering based on DisplayHoverText ivar and interaction state.
vtkSmartPointer< vtkHoverWidget > HoverWidget
virtual vtkInteractorObserver * GetInteractorStyle()
Get the interactor style associated with the render view.
bool InHoverTextRender
vtkSmartPointer< vtkTexturedActor2D > LabelActor
virtual void GenerateSelection(void *callData, vtkSelection *selection)
Generates the selection based on the view event and the selection mode.
virtual void SetInteractionModeTo2D()
Set the interaction mode for the view.
int * GetDisplaySize()
virtual void SetDisplayHoverText(bool b)
Whether the view should display hover text.
virtual void SetTransform(vtkAbstractTransform *transform)
Set the view's transform.
virtual void SetLabelRenderMode(int mode)
Label render mode.
virtual void SetLabelPlacementModeToAll()
virtual int GetLabelPlacementMode()
virtual int GetLabelRenderMode()
void SetSelectionModeToSurface()
static vtkRenderView * New()
virtual void SetLabelRenderModeToQt()
bool PickRenderNeedsUpdate
void SetInteractionMode(int mode)
virtual void SetIconTexture(vtkTexture *texture)
Set the icon sheet to use for rendering icons.
vtkSmartPointer< vtkRenderer > LabelRenderer
virtual void PrepareForRendering()
Called by the view when the renderer is about to render.
virtual void Render()
Updates the representations, then calls Render() on the render window associated with this view.
virtual void SetRenderWindow(vtkRenderWindow *win)
Set the render window for this view.
void UpdatePickRender()
Update the pick render for queries for drag selections or hover ballooons.
virtual void ProcessEvents(vtkObject *caller, unsigned long eventId, void *callData)
Called to process events.
vtkSmartPointer< vtkBalloonRepresentation > Balloon
void SetSelectionModeToFrustum()
virtual void AddLabels(vtkAlgorithmOutput *conn)
Add labels from an input connection with an associated text property.
vtkSmartPointer< vtkLabelPlacementMapper > LabelPlacementMapper
bool RenderOnMouseMove
void GetDisplaySize(int &dsx, int &dsy)
virtual void ApplyViewTheme(vtkViewTheme *theme)
Applies a view theme to this view.
virtual void SetLabelPlacementMode(int mode)
Label placement mode.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkSmartPointer< vtkHardwareSelector > Selector
vtkAbstractTransform * Transform
void SetRenderOnMouseMove(bool b)
Whether to render on every mouse move.
virtual void RemoveLabels(vtkAlgorithmOutput *conn)
Remove labels from an input connection.
virtual void SetInteractor(vtkRenderWindowInteractor *interactor)
The render window interactor.
virtual void UpdateHoverText()
Called in PrepareForRendering to update the hover text.
virtual void SetLabelPlacementModeToNoOverlap()
virtual void SetInteractorStyle(vtkInteractorObserver *style)
The interactor style associated with the render view.
platform-independent render window interaction including picking and frame rate control.
create a window for renderers to draw into
A node in a selection tree.
Definition: vtkSelection.h:44
represent text properties.
handles properties associated with a texture map
Definition: vtkTexture.h:71
actor that draws 2D data with texture support
transform points into different coordinate systems
Sets theme colors for a graphical view.
Definition: vtkViewTheme.h:49
Transform
Definition: ADIOSDefs.h:40
@ mode
Definition: vtkX3D.h:247
@ style
Definition: vtkX3D.h:492
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.