VTK  9.1.0
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=========================================================================*/
25#ifndef vtkFlagpoleLabel_h
26#define vtkFlagpoleLabel_h
27
28#include "vtkActor.h"
29#include "vtkNew.h" // For.... vtkNew!
30#include "vtkRenderingCoreModule.h" // For export macro
31#include "vtkSmartPointer.h" // For.... vtkSmartPointer!
32
33class vtkActor;
34class vtkImageData;
35class vtkLineSource;
36class vtkPolyData;
38class vtkRenderer;
39class vtkTextProperty;
40class vtkTextRenderer;
41
42class VTKRENDERINGCORE_EXPORT vtkFlagpoleLabel : public vtkActor
43{
44public:
46 vtkTypeMacro(vtkFlagpoleLabel, vtkActor);
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
53 void SetInput(const char* in);
54 vtkGetStringMacro(Input);
62 vtkGetObjectMacro(TextProperty, vtkTextProperty);
69 void SetForceOpaque(bool opaque) override;
70 bool GetForceOpaque() override;
71 void ForceOpaqueOn() override;
72 void ForceOpaqueOff() override;
73 void SetForceTranslucent(bool trans) override;
74 bool GetForceTranslucent() override;
75 void ForceTranslucentOn() override;
76 void ForceTranslucentOff() override;
83
88
94
96 double* GetBounds() override;
97 using Superclass::GetBounds;
98
102 vtkGetVector3Macro(BasePosition, double);
103 void SetBasePosition(double x, double y, double z);
104
108 vtkGetVector3Macro(TopPosition, double);
109 void SetTopPosition(double x, double y, double z);
110
116 vtkGetMacro(FlagSize, double);
117 vtkSetMacro(FlagSize, double);
118
119protected:
122
124
126
129
132
133 // Used by the opaque pass to tell the translucent pass not to render.
135 bool IsValid();
136
137 // Used to sync the internal actor's state.
138 void PreRender();
139
140 // Text specification:
141 char* Input;
143
144 // Cached metadata to determine if things need rebuildin'
147
148 // We cache this so we can recompute the bounds between renders, if needed.
150
151 // Rendering stuffies
157
161
162 double TopPosition[3];
163 double BasePosition[3];
164 double FlagSize;
165
166private:
167 vtkFlagpoleLabel(const vtkFlagpoleLabel&) = delete;
168 void operator=(const vtkFlagpoleLabel&) = delete;
169};
170
171#endif // vtkFlagpoleLabel_h
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:155
Renders a flagpole (line) with a label at the top that faces the camera.
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
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.
~vtkFlagpoleLabel() override
double * GetBounds() override
Return a reference to the Prop3D's composite transform.
bool GetForceTranslucent() override
Force the actor to render during the opaque or translucent pass.
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)
bool GetForceOpaque() override
Force the actor to render during the opaque or translucent pass.
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
Definition: vtkImageData.h:157
a simple class to control print indentation
Definition: vtkIndent.h:113
create a line defined by two end points
Allocate and hold a VTK object.
Definition: vtkNew.h:165
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
abstract specification for renderers
Definition: vtkRenderer.h:182
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
Definition: vtkTimeStamp.h:52
abstract specification for Viewports
Definition: vtkViewport.h:47
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39
int vtkTypeBool
Definition: vtkABI.h:69