VTK  9.3.0
vtkActor2D.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
23#ifndef vtkActor2D_h
24#define vtkActor2D_h
25
26#include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
27#include "vtkProp.h"
28#include "vtkRenderingCoreModule.h" // For export macro
29
30VTK_ABI_NAMESPACE_BEGIN
31class vtkMapper2D;
32class vtkProperty2D;
33
34class VTKRENDERINGCORE_EXPORT vtkActor2D : public vtkProp
35{
36public:
37 void PrintSelf(ostream& os, vtkIndent indent) override;
38 vtkTypeMacro(vtkActor2D, vtkProp);
39
45 static vtkActor2D* New();
46
48
51 int RenderOverlay(vtkViewport* viewport) override;
52 int RenderOpaqueGeometry(vtkViewport* viewport) override;
55
60
62
65 virtual void SetMapper(vtkMapper2D* mapper);
66 vtkGetObjectMacro(Mapper, vtkMapper2D);
68
70
73 vtkSetMacro(LayerNumber, int);
74 vtkGetMacro(LayerNumber, int);
76
82
86 virtual void SetProperty(vtkProperty2D*);
87
89
94 vtkViewportCoordinateMacro(Position);
96
100 void SetDisplayPosition(int, int);
101
103
109 vtkViewportCoordinateMacro(Position2);
111
113
118 void SetWidth(double w);
119 double GetWidth();
120 void SetHeight(double h);
121 double GetHeight();
123
128
134 void GetActors2D(vtkPropCollection* pc) override;
135
139 void ShallowCopy(vtkProp* prop) override;
140
147
153 virtual vtkCoordinate* GetActualPositionCoordinate() { return this->PositionCoordinate; }
154
160 virtual vtkCoordinate* GetActualPosition2Coordinate() { return this->Position2Coordinate; }
161
162protected:
164 ~vtkActor2D() override;
165
171
172private:
173 vtkActor2D(const vtkActor2D&) = delete;
174 void operator=(const vtkActor2D&) = delete;
175};
176
177VTK_ABI_NAMESPACE_END
178#endif
a actor that draws 2D data
Definition vtkActor2D.h:35
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Support the standard render methods.
vtkCoordinate * PositionCoordinate
Definition vtkActor2D.h:169
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:168
int LayerNumber
Definition vtkActor2D.h:167
~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.
void SetWidth(double w)
Set/Get the height and width of the Actor2D.
vtkMapper2D * Mapper
Definition vtkActor2D.h:166
virtual vtkCoordinate * GetActualPositionCoordinate()
Return the actual vtkCoordinate reference that the mapper should use to position the actor.
Definition vtkActor2D.h:153
vtkProperty2D * GetProperty()
Returns this actor's vtkProperty2D.
virtual void SetProperty(vtkProperty2D *)
Set this vtkProp's vtkProperty2D.
vtkCoordinate * Position2Coordinate
Definition vtkActor2D.h:170
int RenderOpaqueGeometry(vtkViewport *viewport) override
Support the standard render methods.
virtual vtkCoordinate * GetActualPosition2Coordinate()
Return the actual vtkCoordinate reference that the mapper should use to position the actor.
Definition vtkActor2D.h:160
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:29
abstract class specifies interface for objects which render 2D actors
Definition vtkMapper2D.h:25
an ordered list of Props
abstract superclass for all actors, volumes and annotations
Definition vtkProp.h:43
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:45
window superclass for vtkRenderWindow
Definition vtkWindow.h:25
int vtkTypeBool
Definition vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270