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=========================================================================*/
138#ifndef vtkActor2D_h
139#define vtkActor2D_h
140
141#include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
142#include "vtkProp.h"
143#include "vtkRenderingCoreModule.h" // For export macro
144
145class vtkMapper2D;
146class vtkProperty2D;
147
148class VTKRENDERINGCORE_EXPORT vtkActor2D : public vtkProp
149{
150public:
151 void PrintSelf(ostream& os, vtkIndent indent) override;
152 vtkTypeMacro(vtkActor2D, vtkProp);
153
159 static vtkActor2D* New();
160
162
165 int RenderOverlay(vtkViewport* viewport) override;
166 int RenderOpaqueGeometry(vtkViewport* viewport) override;
169
174
176
179 virtual void SetMapper(vtkMapper2D* mapper);
180 vtkGetObjectMacro(Mapper, vtkMapper2D);
182
184
187 vtkSetMacro(LayerNumber, int);
188 vtkGetMacro(LayerNumber, int);
190
196
201
203
208 vtkViewportCoordinateMacro(Position);
210
214 void SetDisplayPosition(int, int);
215
217
223 vtkViewportCoordinateMacro(Position2);
225
227
232 void SetWidth(double w);
233 double GetWidth();
234 void SetHeight(double h);
235 double GetHeight();
237
242
248 void GetActors2D(vtkPropCollection* pc) override;
249
253 void ShallowCopy(vtkProp* prop) override;
254
261
267 virtual vtkCoordinate* GetActualPositionCoordinate(void) { return this->PositionCoordinate; }
268
274 virtual vtkCoordinate* GetActualPosition2Coordinate(void) { return this->Position2Coordinate; }
275
276protected:
278 ~vtkActor2D() override;
279
285
286private:
287 vtkActor2D(const vtkActor2D&) = delete;
288 void operator=(const vtkActor2D&) = delete;
289};
290
291#endif
a actor that draws 2D data
Definition: vtkActor2D.h:149
virtual vtkCoordinate * GetActualPosition2Coordinate(void)
Return the actual vtkCoordinate reference that the mapper should use to position the actor.
Definition: vtkActor2D.h:274
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Support the standard render methods.
vtkCoordinate * PositionCoordinate
Definition: vtkActor2D.h:283
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:282
int LayerNumber
Definition: vtkActor2D.h:281
~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:267
void SetWidth(double w)
Set/Get the height and width of the Actor2D.
vtkMapper2D * Mapper
Definition: vtkActor2D.h:280
vtkProperty2D * GetProperty()
Returns this actor's vtkProperty2D.
virtual void SetProperty(vtkProperty2D *)
Set this vtkProp's vtkProperty2D.
vtkCoordinate * Position2Coordinate
Definition: vtkActor2D.h:284
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
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:113
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:67
represent surface properties of a 2D image
abstract specification for Viewports
Definition: vtkViewport.h:47
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287