VTK  9.5.20251209
vtkFlagpoleLabel.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
15
16#ifndef vtkFlagpoleLabel_h
17#define vtkFlagpoleLabel_h
18
19#include "vtkActor.h"
20#include "vtkNew.h" // For.... vtkNew!
21#include "vtkRenderingCoreModule.h" // For export macro
22#include "vtkSmartPointer.h" // For.... vtkSmartPointer!
23
24VTK_ABI_NAMESPACE_BEGIN
25class vtkActor;
26class vtkImageData;
27class vtkLineSource;
28class vtkPolyData;
30class vtkRenderer;
31class vtkTextProperty;
32class vtkTextRenderer;
33
34class VTKRENDERINGCORE_EXPORT vtkFlagpoleLabel : public vtkActor
35{
36public:
38 vtkTypeMacro(vtkFlagpoleLabel, vtkActor);
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
45 void SetInput(const char* in);
46 vtkGetStringMacro(Input);
48
54 vtkGetObjectMacro(TextProperty, vtkTextProperty);
56
61 void SetForceOpaque(bool opaque) override;
62 bool GetForceOpaque() VTK_FUTURE_CONST override;
63 void ForceOpaqueOn() override;
64 void ForceOpaqueOff() override;
65 void SetForceTranslucent(bool trans) override;
66 bool GetForceTranslucent() VTK_FUTURE_CONST override;
67 void ForceTranslucentOn() override;
68 void ForceTranslucentOff() override;
70
75
80
86
88 double* GetBounds() override;
89 using Superclass::GetBounds;
90
94 vtkGetVector3Macro(BasePosition, double);
95 void SetBasePosition(double x, double y, double z);
96
100 vtkGetVector3Macro(TopPosition, double);
101 void SetTopPosition(double x, double y, double z);
102
108 vtkGetMacro(FlagSize, double);
109 vtkSetMacro(FlagSize, double);
110
111protected:
113 ~vtkFlagpoleLabel() override;
114
116
118
121
124
125 // Used by the opaque pass to tell the translucent pass not to render.
127 bool IsValid();
128
129 // Used to sync the internal actor's state.
130 void PreRender();
131
132 // Text specification:
133 char* Input;
135
136 // Cached metadata to determine if things need rebuildin'
139
140 // We cache this so we can recompute the bounds between renders, if needed.
142
143 // Rendering stuffies
149
153
154 double TopPosition[3];
155 double BasePosition[3];
156 double FlagSize;
157
158private:
159 vtkFlagpoleLabel(const vtkFlagpoleLabel&) = delete;
160 void operator=(const vtkFlagpoleLabel&) = delete;
161};
162
163VTK_ABI_NAMESPACE_END
164#endif // vtkFlagpoleLabel_h
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:151
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:108
create a line defined by two end points
Allocate and hold a VTK object.
Definition vtkNew.h:167
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
abstract specification for renderers
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:66
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
int vtkTypeBool
Definition vtkABI.h:64