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=========================================================================*/
44#ifndef vtkActor2D_h
45#define vtkActor2D_h
46
47#include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
48#include "vtkProp.h"
49#include "vtkRenderingCoreModule.h" // For export macro
50
51class vtkMapper2D;
52class vtkProperty2D;
53
54class VTKRENDERINGCORE_EXPORT vtkActor2D : public vtkProp
55{
56public:
57 void PrintSelf(ostream& os, vtkIndent indent) override;
58 vtkTypeMacro(vtkActor2D, vtkProp);
59
65 static vtkActor2D* New();
66
68
71 int RenderOverlay(vtkViewport* viewport) override;
72 int RenderOpaqueGeometry(vtkViewport* viewport) override;
75
80
82
85 virtual void SetMapper(vtkMapper2D* mapper);
86 vtkGetObjectMacro(Mapper, vtkMapper2D);
88
90
93 vtkSetMacro(LayerNumber, int);
94 vtkGetMacro(LayerNumber, int);
96
102
107
109
114 vtkViewportCoordinateMacro(Position);
116
120 void SetDisplayPosition(int, int);
121
123
129 vtkViewportCoordinateMacro(Position2);
131
133
138 void SetWidth(double w);
139 double GetWidth();
140 void SetHeight(double h);
141 double GetHeight();
143
148
154 void GetActors2D(vtkPropCollection* pc) override;
155
159 void ShallowCopy(vtkProp* prop) override;
160
167
173 virtual vtkCoordinate* GetActualPositionCoordinate(void) { return this->PositionCoordinate; }
174
180 virtual vtkCoordinate* GetActualPosition2Coordinate(void) { return this->Position2Coordinate; }
181
182protected:
184 ~vtkActor2D() override;
185
191
192private:
193 vtkActor2D(const vtkActor2D&) = delete;
194 void operator=(const vtkActor2D&) = delete;
195};
196
197#endif
a actor that draws 2D data
Definition vtkActor2D.h:55
virtual vtkCoordinate * GetActualPosition2Coordinate(void)
Return the actual vtkCoordinate reference that the mapper should use to position the actor.
Definition vtkActor2D.h:180
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Support the standard render methods.
vtkCoordinate * PositionCoordinate
Definition vtkActor2D.h:189
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:188
int LayerNumber
Definition vtkActor2D.h:187
~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:173
void SetWidth(double w)
Set/Get the height and width of the Actor2D.
vtkMapper2D * Mapper
Definition vtkActor2D.h:186
vtkProperty2D * GetProperty()
Returns this actor's vtkProperty2D.
virtual void SetProperty(vtkProperty2D *)
Set this vtkProp's vtkProperty2D.
vtkCoordinate * Position2Coordinate
Definition vtkActor2D.h:190
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
a simple class to control print indentation
Definition vtkIndent.h:49
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:66
represent surface properties of a 2D image
Computes the portion of a dataset which is inside a selection.
abstract specification for Viewports
Definition vtkViewport.h:65
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
int vtkTypeBool
Definition vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287