VTK  9.1.0
vtkTextActor3D.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkTextActor3D.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=========================================================================*/
33#ifndef vtkTextActor3D_h
34#define vtkTextActor3D_h
35
36#include "vtkProp3D.h"
37#include "vtkRenderingCoreModule.h" // For export macro
38#include <string> // for ivar
39
40class vtkImageActor;
41class vtkImageData;
42class vtkTextProperty;
43
44class VTKRENDERINGCORE_EXPORT vtkTextActor3D : public vtkProp3D
45{
46public:
48 vtkTypeMacro(vtkTextActor3D, vtkProp3D);
49 void PrintSelf(ostream& os, vtkIndent indent) override;
50
52
55 vtkSetStringMacro(Input);
56 vtkGetStringMacro(Input);
58
60
64 vtkGetObjectMacro(TextProperty, vtkTextProperty);
66
73 static int GetRenderedDPI() { return 72; }
74
79 void ShallowCopy(vtkProp* prop) override;
80
84 double* GetBounds() VTK_SIZEHINT(6) override;
85 void GetBounds(double bounds[6]) { this->vtkProp3D::GetBounds(bounds); }
86
92 int GetBoundingBox(int bbox[4]);
93
102
107 virtual void SetForceOpaque(bool opaque);
108 virtual bool GetForceOpaque();
109 virtual void ForceOpaqueOn();
110 virtual void ForceOpaqueOff();
111 virtual void SetForceTranslucent(bool trans);
112 virtual bool GetForceTranslucent();
113 virtual void ForceTranslucentOn();
114 virtual void ForceTranslucentOff();
118
123 int RenderOpaqueGeometry(vtkViewport* viewport) override;
125 int RenderOverlay(vtkViewport* viewport) override;
127
132
133protected:
135 ~vtkTextActor3D() override;
136
137 char* Input;
138
142
145
146 virtual int UpdateImageActor();
147
148private:
149 vtkTextActor3D(const vtkTextActor3D&) = delete;
150 void operator=(const vtkTextActor3D&) = delete;
151};
152
153#endif
draw an image in a rendered 3D scene
topologically and geometrically regular array of data
Definition: vtkImageData.h:157
a simple class to control print indentation
Definition: vtkIndent.h:113
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:93
double * GetBounds() override=0
Return a reference to the Prop3D's composite transform.
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:67
An actor that displays text.
static int GetRenderedDPI()
Since a 3D text actor is not pixel-aligned and positioned in 3D space, the text is rendered at a cons...
virtual void SetForceOpaque(bool opaque)
Force the actor to render during the opaque or translucent pass.
vtkImageActor * ImageActor
virtual void ForceOpaqueOn()
Force the actor to render during the opaque or translucent pass.
virtual bool GetForceOpaque()
Force the actor to render during the opaque or translucent pass.
int RenderOpaqueGeometry(vtkViewport *viewport) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
virtual void SetTextProperty(vtkTextProperty *p)
Set/Get the text property.
virtual void ForceOpaqueOff()
Force the actor to render during the opaque or translucent pass.
double * GetBounds() override
Get the bounds for this Prop3D as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
int GetBoundingBox(int bbox[4])
Get the vtkTextRenderer-derived bounding box for the given vtkTextProperty and text string str.
static vtkTextActor3D * New()
vtkImageData * ImageData
std::string LastInputString
virtual void ForceTranslucentOff()
Force the actor to render during the opaque or translucent pass.
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
vtkTextProperty * TextProperty
~vtkTextActor3D() override
virtual void SetForceTranslucent(bool trans)
Force the actor to render during the opaque or translucent pass.
int RenderOverlay(vtkViewport *viewport) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
vtkTimeStamp BuildTime
void ShallowCopy(vtkProp *prop) override
Shallow copy of this text actor.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void ForceTranslucentOn()
Force the actor to render during the opaque or translucent pass.
vtkTypeBool HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
virtual int UpdateImageActor()
virtual bool GetForceTranslucent()
Force the actor to render during the opaque or translucent pass.
represent text properties.
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:36
void GetBounds(T a, double bds[6])
@ string
Definition: vtkX3D.h:496
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_SIZEHINT(...)