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
42class vtkMapper2D;
43class vtkProperty2D;
44
45class VTKRENDERINGCORE_EXPORT vtkActor2D : public vtkProp
46{
47public:
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;
66
71
73
76 virtual void SetMapper(vtkMapper2D* mapper);
77 vtkGetObjectMacro(Mapper, vtkMapper2D);
79
81
84 vtkSetMacro(LayerNumber, int);
85 vtkGetMacro(LayerNumber, int);
87
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
139
145 void GetActors2D(vtkPropCollection* pc) override;
146
150 void ShallowCopy(vtkProp* prop) override;
151
158
164 virtual vtkCoordinate* GetActualPositionCoordinate(void) { return this->PositionCoordinate; }
165
171 virtual vtkCoordinate* GetActualPosition2Coordinate(void) { return this->Position2Coordinate; }
172
173protected:
175 ~vtkActor2D() override;
176
182
183private:
184 vtkActor2D(const vtkActor2D&) = delete;
185 void operator=(const vtkActor2D&) = delete;
186};
187
188#endif
a actor that draws 2D data
Definition: vtkActor2D.h:46
virtual vtkCoordinate * GetActualPosition2Coordinate(void)
Return the actual vtkCoordinate reference that the mapper should use to position the actor.
Definition: vtkActor2D.h:171
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Support the standard render methods.
vtkCoordinate * PositionCoordinate
Definition: vtkActor2D.h:180
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:179
int LayerNumber
Definition: vtkActor2D.h:178
~vtkActor2D() override
double GetHeight()
Set/Get the height and width of the Actor2D.
vtkTypeBool HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
int RenderOverlay(vtkViewport *viewport) override
Support the standard render methods.
virtual vtkCoordinate * GetActualPositionCoordinate(void)
Return the actual vtkCoordinate reference that the mapper should use to position the actor.
Definition: vtkActor2D.h:164
void SetWidth(double w)
Set/Get the height and width of the Actor2D.
vtkMapper2D * Mapper
Definition: vtkActor2D.h:177
vtkProperty2D * GetProperty()
Returns this actor's vtkProperty2D.
virtual void SetProperty(vtkProperty2D *)
Set this vtkProp's vtkProperty2D.
vtkCoordinate * Position2Coordinate
Definition: vtkActor2D.h:181
int RenderOpaqueGeometry(vtkViewport *viewport) override
Support the standard render methods.
void SetHeight(double h)
Set/Get the height and width of the Actor2D.
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()
Set/Get the height and width of the Actor2D.
virtual void SetMapper(vtkMapper2D *mapper)
Set/Get the vtkMapper2D which defines the data to be drawn.
static vtkActor2D * New()
Creates an actor2D with the following defaults: position (0,0) (coordinate system is viewport); at la...
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:80
a simple class to control print indentation
Definition: vtkIndent.h:40
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:57
represent surface properties of a 2D image
Definition: vtkProperty2D.h:41
Computes the portion of a dataset which is inside a selection.
abstract specification for Viewports
Definition: vtkViewport.h:56
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287