VTK  9.2.6
vtkBillboardTextActor3D.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkBillboardTextActor3D.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=========================================================================*/
22
23#ifndef vtkBillboardTextActor3D_h
24#define vtkBillboardTextActor3D_h
25
26#include "vtkNew.h" // For.... vtkNew!
27#include "vtkProp3D.h"
28#include "vtkRenderingCoreModule.h" // For export macro
29#include "vtkSmartPointer.h" // For.... vtkSmartPointer!
30
31class vtkActor;
32class vtkImageData;
33class vtkPolyData;
35class vtkRenderer;
36class vtkTextProperty;
37class vtkTextRenderer;
38class vtkTexture;
39
40class VTKRENDERINGCORE_EXPORT vtkBillboardTextActor3D : public vtkProp3D
41{
42public:
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46
56
62
67 void SetInput(const char* in);
68 vtkGetStringMacro(Input);
70
76 vtkGetVector2Macro(DisplayOffset, int);
77 vtkSetVector2Macro(DisplayOffset, int);
79
85 vtkGetObjectMacro(TextProperty, vtkTextProperty);
87
92 virtual void SetForceOpaque(bool opaque);
93 virtual bool GetForceOpaque();
94 virtual void ForceOpaqueOn();
95 virtual void ForceOpaqueOff();
96 virtual void SetForceTranslucent(bool trans);
97 virtual bool GetForceTranslucent();
98 virtual void ForceTranslucentOn();
99 virtual void ForceTranslucentOff();
101
106
111
117
119 double* GetBounds() override;
121
126 vtkGetVector3Macro(AnchorDC, double);
127
128protected:
131
133
135
138
141
142 // Used by the opaque pass to tell the translucent pass not to render.
144 bool IsValid();
145
146 // Used to sync the internal actor's state.
147 void PreRender();
148
149 // Text specification:
150 char* Input;
152
153 // Offset in display coordinates.
155
156 // Cached metadata to determine if things need rebuildin'
159
160 // We cache this so we can recompute the bounds between renders, if needed.
162
163 // Rendering stuffies
170
171 // Display coordinate for anchor position. Z value is in NDC.
172 // Cached for GL2PS export on OpenGL2:
173 double AnchorDC[3];
174
175private:
177 void operator=(const vtkBillboardTextActor3D&) = delete;
178};
179
180#endif // vtkBillboardTextActor3D_h
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:52
void SetTextProperty(vtkTextProperty *tprop)
The vtkTextProperty object that controls the rendered text.
vtkNew< vtkTextRenderer > TextRenderer
virtual bool GetForceOpaque()
Force the actor to render during the opaque or translucent pass.
bool TextureIsStale(vtkRenderer *ren)
void SetInput(const char *in)
The UTF-8 encoded string to display.
double * GetBounds() override
Return a reference to the Prop3D's composite transform.
int RenderTranslucentPolygonalGeometry(vtkViewport *vp) override
Just render in translucent pass, since it can execute multiple times (depth peeling,...
virtual bool GetForceTranslucent()
Force the actor to render during the opaque or translucent pass.
int RenderOpaqueGeometry(vtkViewport *vp) override
Check/update geometry/texture in opaque pass, since it only happens once.
void ReleaseGraphicsResources(vtkWindow *win) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
virtual void SetForceTranslucent(bool trans)
Force the actor to render during the opaque or translucent pass.
bool QuadIsStale(vtkRenderer *ren)
virtual void ForceOpaqueOff()
Force the actor to render during the opaque or translucent pass.
static vtkBillboardTextActor3D * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void ForceOpaqueOn()
Force the actor to render during the opaque or translucent pass.
void GenerateQuad(vtkRenderer *ren)
vtkSmartPointer< vtkRenderer > RenderedRenderer
virtual void ForceTranslucentOff()
Force the actor to render during the opaque or translucent pass.
virtual void SetForceOpaque(bool opaque)
Force the actor to render during the opaque or translucent pass.
virtual void ForceTranslucentOn()
Force the actor to render during the opaque or translucent pass.
void GenerateTexture(vtkRenderer *ren)
vtkNew< vtkPolyDataMapper > QuadMapper
void UpdateInternals(vtkRenderer *ren)
void UpdateGeometry(vtkViewport *vp)
Updates the billboard geometry without performing any rendering, to assist GetActors().
vtkTypeBool HasTranslucentPolygonalGeometry() override
Defers to internal actor.
void GetActors(vtkPropCollection *) override
For some exporters and other other operations we must be able to collect all the actors or volumes.
~vtkBillboardTextActor3D() override
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:40
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
void GetBounds(double bounds[6])
Return a reference to the Prop3D's composite transform.
an ordered list of Props
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.
handles properties associated with a texture map
Definition vtkTexture.h:69
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