VTK  9.2.6
vtkFlagpoleLabel.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkFlagpoleLabel.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=========================================================================*/
27
28#ifndef vtkFlagpoleLabel_h
29#define vtkFlagpoleLabel_h
30
31#include "vtkActor.h"
32#include "vtkNew.h" // For.... vtkNew!
33#include "vtkRenderingCoreModule.h" // For export macro
34#include "vtkSmartPointer.h" // For.... vtkSmartPointer!
35
36class vtkActor;
37class vtkImageData;
38class vtkLineSource;
39class vtkPolyData;
41class vtkRenderer;
42class vtkTextProperty;
43class vtkTextRenderer;
44
45class VTKRENDERINGCORE_EXPORT vtkFlagpoleLabel : public vtkActor
46{
47public:
49 vtkTypeMacro(vtkFlagpoleLabel, vtkActor);
50 void PrintSelf(ostream& os, vtkIndent indent) override;
51
56 void SetInput(const char* in);
57 vtkGetStringMacro(Input);
59
65 vtkGetObjectMacro(TextProperty, vtkTextProperty);
67
72 void SetForceOpaque(bool opaque) override;
73 bool GetForceOpaque() VTK_FUTURE_CONST override;
74 void ForceOpaqueOn() override;
75 void ForceOpaqueOff() override;
76 void SetForceTranslucent(bool trans) override;
77 bool GetForceTranslucent() VTK_FUTURE_CONST override;
78 void ForceTranslucentOn() override;
79 void ForceTranslucentOff() override;
81
86
91
97
99 double* GetBounds() override;
100 using Superclass::GetBounds;
101
105 vtkGetVector3Macro(BasePosition, double);
106 void SetBasePosition(double x, double y, double z);
107
111 vtkGetVector3Macro(TopPosition, double);
112 void SetTopPosition(double x, double y, double z);
113
119 vtkGetMacro(FlagSize, double);
120 vtkSetMacro(FlagSize, double);
121
122protected:
124 ~vtkFlagpoleLabel() override;
125
127
129
132
135
136 // Used by the opaque pass to tell the translucent pass not to render.
138 bool IsValid();
139
140 // Used to sync the internal actor's state.
141 void PreRender();
142
143 // Text specification:
144 char* Input;
146
147 // Cached metadata to determine if things need rebuildin'
150
151 // We cache this so we can recompute the bounds between renders, if needed.
153
154 // Rendering stuffies
160
164
165 double TopPosition[3];
166 double BasePosition[3];
167 double FlagSize;
168
169private:
170 vtkFlagpoleLabel(const vtkFlagpoleLabel&) = delete;
171 void operator=(const vtkFlagpoleLabel&) = delete;
172};
173
174#endif // vtkFlagpoleLabel_h
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:52
void ReleaseGraphicsResources(vtkWindow *win) override
Release any graphics resources that are being consumed by this actor.
void SetTextProperty(vtkTextProperty *tprop)
The vtkTextProperty object that controls the rendered text.
vtkSmartPointer< vtkRenderer > RenderedRenderer
void GenerateQuad(vtkRenderer *ren)
vtkNew< vtkActor > QuadActor
vtkNew< vtkPolyDataMapper > PoleMapper
bool GetForceOpaque() VTK_FUTURE_CONST override
Force the actor to render during the opaque or translucent pass.
void ForceOpaqueOff() override
Force the actor to render during the opaque or translucent pass.
void SetInput(const char *in)
The UTF-8 encoded string to display.
vtkNew< vtkLineSource > LineSource
int RenderTranslucentPolygonalGeometry(vtkViewport *vp) override
Just render in translucent pass, since it can execute multiple times (depth peeling,...
vtkTextProperty * TextProperty
vtkNew< vtkActor > PoleActor
vtkNew< vtkPolyDataMapper > QuadMapper
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkNew< vtkImageData > Image
vtkNew< vtkTextRenderer > TextRenderer
int RenderOpaqueGeometry(vtkViewport *vp) override
Check/update geometry/texture in opaque pass, since it only happens once.
void SetTopPosition(double x, double y, double z)
void GenerateTexture(vtkRenderer *ren)
void ForceOpaqueOn() override
Force the actor to render during the opaque or translucent pass.
bool GetForceTranslucent() VTK_FUTURE_CONST override
Force the actor to render during the opaque or translucent pass.
double * GetBounds() override
Return a reference to the Prop3D's composite transform.
void UpdateInternals(vtkRenderer *ren)
void SetForceOpaque(bool opaque) override
Force the actor to render during the opaque or translucent pass.
void ForceTranslucentOn() override
Force the actor to render during the opaque or translucent pass.
vtkTimeStamp InputMTime
vtkNew< vtkPolyData > Quad
static vtkFlagpoleLabel * New()
void SetForceTranslucent(bool trans) override
Force the actor to render during the opaque or translucent pass.
bool QuadIsStale(vtkRenderer *ren)
bool TextureIsStale(vtkRenderer *ren)
void SetBasePosition(double x, double y, double z)
vtkTypeBool HasTranslucentPolygonalGeometry() override
Defers to internal actor.
void ForceTranslucentOff() override
Force the actor to render during the opaque or translucent pass.
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:40
create a line defined by two end points
Allocate and hold a VTK object.
Definition vtkNew.h:62
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:91
abstract specification for renderers
Definition vtkRenderer.h:73
Hold a reference to a vtkObjectBase instance.
represent text properties.
Interface for generating images and path data from string data, using multiple backends.
record modification and/or execution time
abstract specification for Viewports
Definition vtkViewport.h:56
window superclass for vtkRenderWindow
Definition vtkWindow.h:39
int vtkTypeBool
Definition vtkABI.h:69