VTK  9.2.6
vtkActor2D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkActor2D.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 =========================================================================*/
35 #ifndef vtkActor2D_h
36 #define vtkActor2D_h
37 
38 #include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
39 #include "vtkProp.h"
40 #include "vtkRenderingCoreModule.h" // For export macro
41 
42 class vtkMapper2D;
43 class vtkProperty2D;
44 
45 class VTKRENDERINGCORE_EXPORT vtkActor2D : public vtkProp
46 {
47 public:
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49  vtkTypeMacro(vtkActor2D, vtkProp);
50 
56  static vtkActor2D* New();
57 
59 
62  int RenderOverlay(vtkViewport* viewport) override;
63  int RenderOpaqueGeometry(vtkViewport* viewport) override;
64  int RenderTranslucentPolygonalGeometry(vtkViewport* viewport) override;
66 
71 
73 
76  virtual void SetMapper(vtkMapper2D* mapper);
77  vtkGetObjectMacro(Mapper, vtkMapper2D);
79 
81 
84  vtkSetMacro(LayerNumber, int);
85  vtkGetMacro(LayerNumber, int);
87 
92  vtkProperty2D* GetProperty();
93 
97  virtual void SetProperty(vtkProperty2D*);
98 
100 
105  vtkViewportCoordinateMacro(Position);
107 
111  void SetDisplayPosition(int, int);
112 
114 
120  vtkViewportCoordinateMacro(Position2);
122 
124 
129  void SetWidth(double w);
130  double GetWidth();
131  void SetHeight(double h);
132  double GetHeight();
134 
138  vtkMTimeType GetMTime() override;
139 
145  void GetActors2D(vtkPropCollection* pc) override;
146 
150  void ShallowCopy(vtkProp* prop) override;
151 
157  void ReleaseGraphicsResources(vtkWindow*) override;
158 
164  virtual vtkCoordinate* GetActualPositionCoordinate(void) { return this->PositionCoordinate; }
165 
171  virtual vtkCoordinate* GetActualPosition2Coordinate(void) { return this->Position2Coordinate; }
172 
173 protected:
174  vtkActor2D();
175  ~vtkActor2D() override;
176 
182 
183 private:
184  vtkActor2D(const vtkActor2D&) = delete;
185  void operator=(const vtkActor2D&) = delete;
186 };
187 
188 #endif
vtkMapper2D * Mapper
Definition: vtkActor2D.h:177
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:56
virtual vtkCoordinate * GetActualPosition2Coordinate(void)
Return the actual vtkCoordinate reference that the mapper should use to position the actor...
Definition: vtkActor2D.h:171
virtual void ShallowCopy(vtkProp *prop)
Shallow copy of this vtkProp.
int LayerNumber
Definition: vtkActor2D.h:178
vtkCoordinate * Position2Coordinate
Definition: vtkActor2D.h:181
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
abstract specification for Viewports
Definition: vtkViewport.h:55
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
virtual vtkTypeBool HasTranslucentPolygonalGeometry()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:288
virtual int RenderOverlay(vtkViewport *)
Definition: vtkProp.h:227
a actor that draws 2D data
Definition: vtkActor2D.h:45
vtkCoordinate * PositionCoordinate
Definition: vtkActor2D.h:180
an ordered list of Props
int vtkTypeBool
Definition: vtkABI.h:69
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkProp.h:309
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
vtkProperty2D * Property
Definition: vtkActor2D.h:179
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual vtkMTimeType GetMTime()
Return this object's modified time.
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems ...
Definition: vtkCoordinate.h:79
virtual void GetActors2D(vtkPropCollection *)
Definition: vtkProp.h:68
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
Definition: vtkProp.h:225
represent surface properties of a 2D image
Definition: vtkProperty2D.h:40
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
virtual vtkCoordinate * GetActualPositionCoordinate(void)
Return the actual vtkCoordinate reference that the mapper should use to position the actor...
Definition: vtkActor2D.h:164
abstract class specifies interface for objects which render 2D actors
Definition: vtkMapper2D.h:35