VTK  9.1.0
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=========================================================================*/
38#ifndef vtkActor2D_h
39#define vtkActor2D_h
40
41#include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
42#include "vtkProp.h"
43#include "vtkRenderingCoreModule.h" // For export macro
44
45class vtkMapper2D;
46class vtkProperty2D;
47
48class VTKRENDERINGCORE_EXPORT vtkActor2D : public vtkProp
49{
50public:
51 void PrintSelf(ostream& os, vtkIndent indent) override;
52 vtkTypeMacro(vtkActor2D, vtkProp);
53
59 static vtkActor2D* New();
60
62
65 int RenderOverlay(vtkViewport* viewport) override;
66 int RenderOpaqueGeometry(vtkViewport* viewport) override;
69
74
76
79 virtual void SetMapper(vtkMapper2D* mapper);
80 vtkGetObjectMacro(Mapper, vtkMapper2D);
82
84
87 vtkSetMacro(LayerNumber, int);
88 vtkGetMacro(LayerNumber, int);
90
96
101
103
108 vtkViewportCoordinateMacro(Position);
110
114 void SetDisplayPosition(int, int);
115
117
123 vtkViewportCoordinateMacro(Position2);
125
127
132 void SetWidth(double w);
133 double GetWidth();
134 void SetHeight(double h);
135 double GetHeight();
137
142
148 void GetActors2D(vtkPropCollection* pc) override;
149
153 void ShallowCopy(vtkProp* prop) override;
154
161
167 virtual vtkCoordinate* GetActualPositionCoordinate(void) { return this->PositionCoordinate; }
168
174 virtual vtkCoordinate* GetActualPosition2Coordinate(void) { return this->Position2Coordinate; }
175
176protected:
178 ~vtkActor2D() override;
179
185
186private:
187 vtkActor2D(const vtkActor2D&) = delete;
188 void operator=(const vtkActor2D&) = delete;
189};
190
191#endif
a actor that draws 2D data
Definition: vtkActor2D.h:49
virtual vtkCoordinate * GetActualPosition2Coordinate(void)
Return the actual vtkCoordinate reference that the mapper should use to position the actor.
Definition: vtkActor2D.h:174
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Support the standard render methods.
vtkCoordinate * PositionCoordinate
Definition: vtkActor2D.h:183
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:182
int LayerNumber
Definition: vtkActor2D.h:181
~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:167
void SetWidth(double w)
Set/Get the height and width of the Actor2D.
vtkMapper2D * Mapper
Definition: vtkActor2D.h:180
vtkProperty2D * GetProperty()
Returns this actor's vtkProperty2D.
virtual void SetProperty(vtkProperty2D *)
Set this vtkProp's vtkProperty2D.
vtkCoordinate * Position2Coordinate
Definition: vtkActor2D.h:184
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:86
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:43
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:47
abstract specification for Viewports
Definition: vtkViewport.h:56
window superclass for vtkRenderWindow
Definition: vtkWindow.h:45
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287