VTK  9.7.20260913
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
24
25VTK_ABI_NAMESPACE_BEGIN
26class vtkActor;
27class vtkImageData;
28class vtkLineSource;
29class vtkPolyData;
31class vtkRenderer;
32class vtkTextProperty;
33class vtkTextRenderer;
34
35class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkFlagpoleLabel : public vtkActor
36{
37public:
39 vtkTypeMacro(vtkFlagpoleLabel, vtkActor);
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
46 void SetInput(const char* in);
47 vtkGetStringMacro(Input);
49
55 vtkGetObjectMacro(TextProperty, vtkTextProperty);
57
62 void SetForceOpaque(bool opaque) override;
63 bool GetForceOpaque() VTK_FUTURE_CONST override;
64 void ForceOpaqueOn() override;
65 void ForceOpaqueOff() override;
66 void SetForceTranslucent(bool trans) override;
67 bool GetForceTranslucent() VTK_FUTURE_CONST override;
68 void ForceTranslucentOn() override;
69 void ForceTranslucentOff() override;
71
76
81
87
89 double* GetBounds() override;
90 using Superclass::GetBounds;
91
95 vtkGetVector3Macro(BasePosition, double);
96 void SetBasePosition(double x, double y, double z);
97
101 vtkGetVector3Macro(TopPosition, double);
102 void SetTopPosition(double x, double y, double z);
103
109 vtkGetMacro(FlagSize, double);
110 vtkSetMacro(FlagSize, double);
111
112protected:
114 ~vtkFlagpoleLabel() override;
115
117
119
122
125
126 // Used by the opaque pass to tell the translucent pass not to render.
128 bool IsValid();
129
130 // Used to sync the internal actor's state.
131 void PreRender();
132
133 // Text specification:
134 char* Input;
136
137 // Cached metadata to determine if things need rebuildin'
140
141 // We cache this so we can recompute the bounds between renders, if needed.
143
144 // Rendering stuffies
150
154
155 double TopPosition[3];
156 double BasePosition[3];
157 double FlagSize;
158
159private:
160 vtkFlagpoleLabel(const vtkFlagpoleLabel&) = delete;
161 void operator=(const vtkFlagpoleLabel&) = delete;
162};
163
164VTK_ABI_NAMESPACE_END
165#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:168
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:62
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_MARSHALAUTO