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 =========================================================================*/
29 #ifndef vtkActor2D_h
30 #define vtkActor2D_h
31 
32 #include "vtkRenderingCoreModule.h" // For export macro
33 #include "vtkProp.h"
34 #include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
35 
36 class vtkMapper2D;
37 class vtkProperty2D;
38 
39 class VTKRENDERINGCORE_EXPORT vtkActor2D : public vtkProp
40 {
41 public:
42  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
43  vtkTypeMacro(vtkActor2D,vtkProp);
44 
50  static vtkActor2D* New();
51 
53 
56  int RenderOverlay(vtkViewport *viewport) VTK_OVERRIDE;
57  int RenderOpaqueGeometry(vtkViewport *viewport) VTK_OVERRIDE;
58  int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) VTK_OVERRIDE;
60 
64  int HasTranslucentPolygonalGeometry() VTK_OVERRIDE;
65 
67 
70  virtual void SetMapper(vtkMapper2D *mapper);
71  vtkGetObjectMacro(Mapper, vtkMapper2D);
73 
75 
78  vtkSetMacro(LayerNumber, int);
79  vtkGetMacro(LayerNumber, int);
81 
86  vtkProperty2D* GetProperty();
87 
91  virtual void SetProperty(vtkProperty2D*);
92 
94 
99  vtkViewportCoordinateMacro(Position);
101 
105  void SetDisplayPosition(int,int);
106 
108 
114  vtkViewportCoordinateMacro(Position2);
116 
118 
123  void SetWidth(double w);
124  double GetWidth();
125  void SetHeight(double h);
126  double GetHeight();
128 
132  vtkMTimeType GetMTime() VTK_OVERRIDE;
133 
139  void GetActors2D(vtkPropCollection *pc) VTK_OVERRIDE;
140 
144  void ShallowCopy(vtkProp *prop) VTK_OVERRIDE;
145 
151  void ReleaseGraphicsResources(vtkWindow *) VTK_OVERRIDE;
152 
158  virtual vtkCoordinate *GetActualPositionCoordinate(void)
159  { return this->PositionCoordinate; }
160 
167  { return this->Position2Coordinate; }
168 
169 protected:
170  vtkActor2D();
171  ~vtkActor2D() VTK_OVERRIDE;
172 
173  vtkMapper2D *Mapper;
174  int LayerNumber;
175  vtkProperty2D *Property;
176  vtkCoordinate *PositionCoordinate;
177  vtkCoordinate *Position2Coordinate;
178 
179 private:
180  vtkActor2D(const vtkActor2D&) VTK_DELETE_FUNCTION;
181  void operator=(const vtkActor2D&) VTK_DELETE_FUNCTION;
182 };
183 
184 #endif
185 
186 
187 
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:44
virtual vtkCoordinate * GetActualPosition2Coordinate(void)
Return the actual vtkCoordinate reference that the mapper should use to position the actor...
Definition: vtkActor2D.h:166
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
abstract specification for Viewports
Definition: vtkViewport.h:44
virtual int RenderOpaqueGeometry(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:216
virtual int 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:222
a actor that draws 2D data
Definition: vtkActor2D.h:39
an ordered list of Props
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
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:33
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems ...
Definition: vtkCoordinate.h:72
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
Definition: vtkProp.h:218
represent surface properties of a 2D image
Definition: vtkProperty2D.h:37
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
abstract class specifies interface for objects which render 2D actors
Definition: vtkMapper2D.h:35