VTK
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 "vtkRenderingCoreModule.h" // For export macro
39 #include "vtkProp.h"
40 #include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
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 
165  { return this->PositionCoordinate; }
166 
173  { return this->Position2Coordinate; }
174 
175 protected:
176  vtkActor2D();
177  ~vtkActor2D() override;
178 
184 
185 private:
186  vtkActor2D(const vtkActor2D&) = delete;
187  void operator=(const vtkActor2D&) = delete;
188 };
189 
190 #endif
191 
192 
193 
vtkMapper2D * Mapper
Definition: vtkActor2D.h:179
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:52
virtual vtkCoordinate * GetActualPosition2Coordinate(void)
Return the actual vtkCoordinate reference that the mapper should use to position the actor...
Definition: vtkActor2D.h:172
virtual void ShallowCopy(vtkProp *prop)
Shallow copy of this vtkProp.
int LayerNumber
Definition: vtkActor2D.h:180
vtkCoordinate * Position2Coordinate
Definition: vtkActor2D.h:183
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
abstract specification for Viewports
Definition: vtkViewport.h:47
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:296
virtual int RenderOverlay(vtkViewport *)
Definition: vtkProp.h:230
a actor that draws 2D data
Definition: vtkActor2D.h:45
vtkCoordinate * PositionCoordinate
Definition: vtkActor2D.h:182
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:305
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
vtkProperty2D * Property
Definition: vtkActor2D.h:181
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:81
virtual void GetActors2D(vtkPropCollection *)
Definition: vtkProp.h:64
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
Definition: vtkProp.h:226
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