VTK  9.0.2
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 "vtkCoordinate.h" // For vtkViewportCoordinateMacro
33 #include "vtkProp.h"
34 #include "vtkRenderingCoreModule.h" // For export macro
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) override;
43  vtkTypeMacro(vtkActor2D, vtkProp);
44 
50  static vtkActor2D* New();
51 
53 
56  int RenderOverlay(vtkViewport* viewport) override;
57  int RenderOpaqueGeometry(vtkViewport* viewport) override;
60 
65 
67 
70  virtual void SetMapper(vtkMapper2D* mapper);
71  vtkGetObjectMacro(Mapper, vtkMapper2D);
73 
75 
78  vtkSetMacro(LayerNumber, int);
79  vtkGetMacro(LayerNumber, int);
81 
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() override;
133 
139  void GetActors2D(vtkPropCollection* pc) override;
140 
144  void ShallowCopy(vtkProp* prop) override;
145 
152 
158  virtual vtkCoordinate* GetActualPositionCoordinate(void) { return this->PositionCoordinate; }
159 
165  virtual vtkCoordinate* GetActualPosition2Coordinate(void) { return this->Position2Coordinate; }
166 
167 protected:
169  ~vtkActor2D() override;
170 
176 
177 private:
178  vtkActor2D(const vtkActor2D&) = delete;
179  void operator=(const vtkActor2D&) = delete;
180 };
181 
182 #endif
a actor that draws 2D data
Definition: vtkActor2D.h:40
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
vtkCoordinate * PositionCoordinate
Definition: vtkActor2D.h:174
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
vtkMTimeType GetMTime() override
Return this objects MTime.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkProperty2D * Property
Definition: vtkActor2D.h:173
int LayerNumber
Definition: vtkActor2D.h:172
~vtkActor2D() override
virtual vtkCoordinate * GetActualPositionCoordinate(void)
Return the actual vtkCoordinate reference that the mapper should use to position the actor.
Definition: vtkActor2D.h:158
double GetHeight()
static vtkActor2D * New()
Creates an actor2D with the following defaults: position (0,0) (coordinate system is viewport); at la...
vtkTypeBool HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
int RenderOverlay(vtkViewport *viewport) override
Support the standard render methods.
void SetWidth(double w)
Set/Get the height and width of the Actor2D.
vtkMapper2D * Mapper
Definition: vtkActor2D.h:171
vtkProperty2D * GetProperty()
Returns this actor's vtkProperty2D.
virtual void SetProperty(vtkProperty2D *)
Set this vtkProp's vtkProperty2D.
vtkCoordinate * Position2Coordinate
Definition: vtkActor2D.h:175
int RenderOpaqueGeometry(vtkViewport *viewport) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
void SetHeight(double h)
void ShallowCopy(vtkProp *prop) override
Shallow copy of this vtkActor2D.
void GetActors2D(vtkPropCollection *pc) override
For some exporters and other other operations we must be able to collect all the actors or volumes.
double GetWidth()
virtual void SetMapper(vtkMapper2D *mapper)
Set/Get the vtkMapper2D which defines the data to be drawn.
virtual vtkCoordinate * GetActualPosition2Coordinate(void)
Return the actual vtkCoordinate reference that the mapper should use to position the actor.
Definition: vtkActor2D.h:165
void SetDisplayPosition(int, int)
Set the Prop2D's position in display coordinates.
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
Definition: vtkCoordinate.h:77
vtkFrustumSelector is a vtkSelector that selects elements based on whether they are inside or interse...
a simple class to control print indentation
Definition: vtkIndent.h:34
abstract class specifies interface for objects which render 2D actors
Definition: vtkMapper2D.h:36
an ordered list of Props
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:54
represent surface properties of a 2D image
Definition: vtkProperty2D.h:38
abstract specification for Viewports
Definition: vtkViewport.h:45
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293