VTK
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 =========================================================================*/
36 #ifndef vtkTextActor3D_h
37 #define vtkTextActor3D_h
38 
39 #include "vtkRenderingCoreModule.h" // For export macro
40 #include "vtkProp3D.h"
41 #include <string> // for ivar
42 
43 class vtkImageActor;
44 class vtkImageData;
45 class vtkTextProperty;
46 
47 class VTKRENDERINGCORE_EXPORT vtkTextActor3D : public vtkProp3D
48 {
49 public:
50  static vtkTextActor3D *New();
51  vtkTypeMacro(vtkTextActor3D,vtkProp3D);
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
55 
58  vtkSetStringMacro(Input);
59  vtkGetStringMacro(Input);
61 
63 
66  virtual void SetTextProperty(vtkTextProperty *p);
67  vtkGetObjectMacro(TextProperty,vtkTextProperty);
69 
76  static int GetRenderedDPI() { return 72; }
77 
82  void ShallowCopy(vtkProp *prop) override;
83 
87  double *GetBounds() VTK_SIZEHINT(6) override;
88  void GetBounds(double bounds[6]) {this->vtkProp3D::GetBounds( bounds );}
89 
95  int GetBoundingBox(int bbox[4]);
96 
104  void ReleaseGraphicsResources(vtkWindow *) override;
105 
110  virtual void SetForceOpaque(bool opaque);
111  virtual bool GetForceOpaque();
112  virtual void ForceOpaqueOn();
113  virtual void ForceOpaqueOff();
114  virtual void SetForceTranslucent(bool trans);
115  virtual bool GetForceTranslucent();
116  virtual void ForceTranslucentOn();
117  virtual void ForceTranslucentOff();
126  int RenderOpaqueGeometry(vtkViewport* viewport) override;
127  int RenderTranslucentPolygonalGeometry(vtkViewport* viewport) override;
128  int RenderOverlay(vtkViewport* viewport) override;
130 
135 
136 protected:
137  vtkTextActor3D();
138  ~vtkTextActor3D() override;
139 
140  char *Input;
141 
145 
148 
149  virtual int UpdateImageActor();
150 
151 private:
152  vtkTextActor3D(const vtkTextActor3D&) = delete;
153  void operator=(const vtkTextActor3D&) = delete;
154 };
155 
156 
157 #endif
vtkProp3D
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:46
vtkProp::RenderOverlay
virtual int RenderOverlay(vtkViewport *)
Definition: vtkProp.h:230
vtkProp3D::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTextActor3D
An actor that displays text.
Definition: vtkTextActor3D.h:47
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:35
vtkProp::RenderOpaqueGeometry
virtual int RenderOpaqueGeometry(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:224
vtkTextActor3D::ImageActor
vtkImageActor * ImageActor
Definition: vtkTextActor3D.h:142
vtkTextActor3D::GetRenderedDPI
static int GetRenderedDPI()
Since a 3D text actor is not pixel-aligned and positioned in 3D space, the text is rendered at a cons...
Definition: vtkTextActor3D.h:76
vtkProp3D::GetBounds
double * GetBounds() override=0
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
vtkProp::HasTranslucentPolygonalGeometry
virtual vtkTypeBool HasTranslucentPolygonalGeometry()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:296
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:42
vtkTextActor3D::BuildTime
vtkTimeStamp BuildTime
Definition: vtkTextActor3D.h:146
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkTextActor3D::TextProperty
vtkTextProperty * TextProperty
Definition: vtkTextActor3D.h:144
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:47
vtkProp::RenderTranslucentPolygonalGeometry
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
Definition: vtkProp.h:226
vtkTextProperty
represent text properties.
Definition: vtkTextProperty.h:39
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:52
vtkX3D::string
Definition: vtkX3D.h:490
vtkProp3D::ShallowCopy
void ShallowCopy(vtkProp *prop) override
Shallow copy of this vtkProp3D.
vtkImageActor
draw an image in a rendered 3D scene
Definition: vtkImageActor.h:49
vtkTextActor3D::Input
char * Input
Definition: vtkTextActor3D.h:140
vtkTextActor3D::ImageData
vtkImageData * ImageData
Definition: vtkTextActor3D.h:143
vtkProp::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkProp.h:305
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkProp3D.h
vtkTextActor3D::LastInputString
std::string LastInputString
Definition: vtkTextActor3D.h:147