VTK  9.5.2
vtkRenderView.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3// SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
39
40#ifndef vtkRenderView_h
41#define vtkRenderView_h
42
43#include "vtkRenderViewBase.h"
44#include "vtkSmartPointer.h" // For SP ivars
45#include "vtkViewsInfovisModule.h" // For export macro
46
47VTK_ABI_NAMESPACE_BEGIN
49class vtkActor2D;
55class vtkHoverWidget;
59class vtkSelection;
60class vtkTextProperty;
61class vtkTexture;
64
65class VTKVIEWSINFOVIS_EXPORT vtkRenderView : public vtkRenderViewBase
66{
67public:
68 static vtkRenderView* New();
70 void PrintSelf(ostream& os, vtkIndent indent) override;
71
77 void SetInteractor(vtkRenderWindowInteractor* interactor) override;
78
83
88
94 void SetRenderWindow(vtkRenderWindow* win) override;
95
96 enum
97 {
101 };
102
103 void SetInteractionMode(int mode);
104 vtkGetMacro(InteractionMode, int);
105
113
118 void Render() override;
119
123 void ApplyViewTheme(vtkViewTheme* theme) override;
124
126
130 virtual void SetTransform(vtkAbstractTransform* transform);
131 vtkGetObjectMacro(Transform, vtkAbstractTransform);
133
135
138 virtual void SetDisplayHoverText(bool b);
139 vtkGetMacro(DisplayHoverText, bool);
140 vtkBooleanMacro(DisplayHoverText, bool);
142
143 enum
144 {
147 };
148
150
157 vtkSetClampMacro(SelectionMode, int, 0, 1);
158 vtkGetMacro(SelectionMode, int);
162
168 virtual void AddLabels(vtkAlgorithmOutput* conn);
169
173 virtual void RemoveLabels(vtkAlgorithmOutput* conn);
174
176
179 virtual void SetIconTexture(vtkTexture* texture);
180 vtkGetObjectMacro(IconTexture, vtkTexture);
182
184
187 vtkSetVector2Macro(IconSize, int);
188 vtkGetVector2Macro(IconSize, int);
190
192
196 vtkSetVector2Macro(DisplaySize, int);
198 void GetDisplaySize(int& dsx, int& dsy);
200
201 enum
202 {
205 };
206
208
215 virtual void SetLabelPlacementMode(int mode);
220
221 enum
222 {
225 };
226
228
233 virtual void SetLabelRenderMode(int mode);
234 virtual int GetLabelRenderMode();
238
240
244 vtkGetMacro(RenderOnMouseMove, bool);
245 vtkBooleanMacro(RenderOnMouseMove, bool);
247
248protected:
250 ~vtkRenderView() override;
251
257 void ProcessEvents(vtkObject* caller, unsigned long eventId, void* callData) override;
258
262 virtual void GenerateSelection(void* callData, vtkSelection* selection);
263
267 void PrepareForRendering() override;
268
272 virtual void UpdateHoverText();
273
279
285
293
296 int IconSize[2];
298
301
308
309private:
310 vtkRenderView(const vtkRenderView&) = delete;
311 void operator=(const vtkRenderView&) = delete;
312};
313
314VTK_ABI_NAMESPACE_END
315#endif
superclass for all geometric transformations
a actor that draws 2D data
Definition vtkActor2D.h:145
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
invoke a vtkTimerEvent when hovering
a simple class to control print indentation
Definition vtkIndent.h:108
an abstract superclass for classes observing events invoked by vtkRenderWindowInteractor
Places and renders non-overlapping labels.
draw vtkPolyData onto the image plane
vtkTexture * IconTexture
virtual void SetInteractionModeTo3D()
virtual void SetLabelRenderModeToFreetype()
Label render mode.
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.
void PrepareForRendering() override
Called by the view when the renderer is about to render.
void ApplyViewTheme(vtkViewTheme *theme) override
Applies a view theme to this view.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSmartPointer< vtkTexturedActor2D > LabelActor
void ProcessEvents(vtkObject *caller, unsigned long eventId, void *callData) override
Called to process events.
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()
Set the display size of the icon (which may be different from the icon size).
void Render() override
Updates the representations, then calls Render() on the render window associated with this view.
virtual void SetDisplayHoverText(bool b)
Whether the view should display hover text.
virtual void SetTransform(vtkAbstractTransform *transform)
Set the view's transform.
virtual void SetSelectionMode(int)
Sets the selection mode for the render view.
virtual void SetLabelRenderMode(int mode)
Label render mode.
virtual void SetLabelPlacementModeToAll()
Label placement mode.
virtual int GetLabelPlacementMode()
Label placement mode.
virtual int GetLabelRenderMode()
Label render mode.
void SetSelectionModeToSurface()
Sets the selection mode for the render view.
static vtkRenderView * New()
virtual void SetLabelRenderModeToQt()
Label render mode.
void SetInteractor(vtkRenderWindowInteractor *interactor) override
The render window interactor.
bool PickRenderNeedsUpdate
void SetInteractionMode(int mode)
~vtkRenderView() override
virtual void SetIconTexture(vtkTexture *texture)
Set the icon sheet to use for rendering icons.
vtkSmartPointer< vtkRenderer > LabelRenderer
void UpdatePickRender()
Update the pick render for queries for drag selections or hover ballooons.
void SetRenderWindow(vtkRenderWindow *win) override
Set the render window for this view.
vtkSmartPointer< vtkBalloonRepresentation > Balloon
void SetSelectionModeToFrustum()
Sets the selection mode for the render view.
virtual void AddLabels(vtkAlgorithmOutput *conn)
Add labels from an input connection with an associated text property.
vtkSmartPointer< vtkLabelPlacementMapper > LabelPlacementMapper
void GetDisplaySize(int &dsx, int &dsy)
Set the display size of the icon (which may be different from the icon size).
virtual void SetLabelPlacementMode(int mode)
Label placement mode.
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 UpdateHoverText()
Called in PrepareForRendering to update the hover text.
virtual void SetLabelPlacementModeToNoOverlap()
Label placement mode.
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
data object that represents a "selection" in VTK.
Hold a reference to a vtkObjectBase instance.
represent text properties.
handles properties associated with a texture map
Definition vtkTexture.h:168
actor that draws 2D data with texture support
transform points into different coordinate systems
Sets theme colors for a graphical view.