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
32#ifndef vtkActor2D_h
33#define vtkActor2D_h
34
35#include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
36#include "vtkProp.h"
37#include "vtkRenderingCoreModule.h" // For export macro
38
39VTK_ABI_NAMESPACE_BEGIN
40class vtkMapper2D;
41class vtkProperty2D;
42
43class VTKRENDERINGCORE_EXPORT vtkActor2D : public vtkProp
44{
45public:
46 void PrintSelf(ostream& os, vtkIndent indent) override;
47 vtkTypeMacro(vtkActor2D, vtkProp);
48
54 static vtkActor2D* New();
55
57
60 int RenderOverlay(vtkViewport* viewport) override;
61 int RenderOpaqueGeometry(vtkViewport* viewport) override;
64
69
71
74 virtual void SetMapper(vtkMapper2D* mapper);
75 vtkGetObjectMacro(Mapper, vtkMapper2D);
77
79
82 vtkSetMacro(LayerNumber, int);
83 vtkGetMacro(LayerNumber, int);
85
91
95 virtual void SetProperty(vtkProperty2D*);
96
98
103 vtkViewportCoordinateMacro(Position);
105
109 void SetDisplayPosition(int, int);
110
112
118 vtkViewportCoordinateMacro(Position2);
120
122
127 void SetWidth(double w);
128 double GetWidth();
129 void SetHeight(double h);
130 double GetHeight();
132
137
143 void GetActors2D(vtkPropCollection* pc) override;
144
148 void ShallowCopy(vtkProp* prop) override;
149
156
162 virtual vtkCoordinate* GetActualPositionCoordinate() { return this->PositionCoordinate; }
163
169 virtual vtkCoordinate* GetActualPosition2Coordinate() { return this->Position2Coordinate; }
170
171protected:
173 ~vtkActor2D() override;
174
180
181private:
182 vtkActor2D(const vtkActor2D&) = delete;
183 void operator=(const vtkActor2D&) = delete;
184};
185
186VTK_ABI_NAMESPACE_END
187#endif
a actor that draws 2D data
Definition vtkActor2D.h:44
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Support the standard render methods.
vtkCoordinate * PositionCoordinate
Definition vtkActor2D.h:178
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:177
int LayerNumber
Definition vtkActor2D.h:176
~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:175
virtual vtkCoordinate * GetActualPositionCoordinate()
Return the actual vtkCoordinate reference that the mapper should use to position the actor.
Definition vtkActor2D.h:162
vtkProperty2D * GetProperty()
Returns this actor's vtkProperty2D.
virtual void SetProperty(vtkProperty2D *)
Set this vtkProp's vtkProperty2D.
vtkCoordinate * Position2Coordinate
Definition vtkActor2D.h:179
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:169
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:38
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:52
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:54
window superclass for vtkRenderWindow
Definition vtkWindow.h:34
int vtkTypeBool
Definition vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270