VTK  9.3.20240419
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
132 #ifndef vtkActor2D_h
133 #define vtkActor2D_h
134 
135 #include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
136 #include "vtkProp.h"
137 #include "vtkRenderingCoreModule.h" // For export macro
138 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
139 
140 VTK_ABI_NAMESPACE_BEGIN
141 class vtkMapper2D;
142 class vtkProperty2D;
143 
144 class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkActor2D : public vtkProp
145 {
146 public:
147  void PrintSelf(ostream& os, vtkIndent indent) override;
148  vtkTypeMacro(vtkActor2D, vtkProp);
149 
155  static vtkActor2D* New();
156 
158 
161  int RenderOverlay(vtkViewport* viewport) override;
162  int RenderOpaqueGeometry(vtkViewport* viewport) override;
165 
170 
172 
175  virtual void SetMapper(vtkMapper2D* mapper);
176  vtkGetObjectMacro(Mapper, vtkMapper2D);
178 
180 
183  vtkSetMacro(LayerNumber, int);
184  vtkGetMacro(LayerNumber, int);
186 
192 
196  virtual void SetProperty(vtkProperty2D*);
197 
199 
204  vtkViewportCoordinateMacro(Position);
206 
210  void SetDisplayPosition(int, int);
211 
213 
219  vtkViewportCoordinateMacro(Position2);
221 
223 
228  void SetWidth(double w);
229  double GetWidth();
230  void SetHeight(double h);
231  double GetHeight();
233 
237  vtkMTimeType GetMTime() override;
238 
244  void GetActors2D(vtkPropCollection* pc) override;
245 
249  void ShallowCopy(vtkProp* prop) override;
250 
257 
263  virtual vtkCoordinate* GetActualPositionCoordinate() { return this->PositionCoordinate; }
264 
270  virtual vtkCoordinate* GetActualPosition2Coordinate() { return this->Position2Coordinate; }
271 
272 protected:
274  ~vtkActor2D() override;
275 
281 
282 private:
283  vtkActor2D(const vtkActor2D&) = delete;
284  void operator=(const vtkActor2D&) = delete;
285 };
286 
287 VTK_ABI_NAMESPACE_END
288 #endif
a actor that draws 2D data
Definition: vtkActor2D.h:145
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Support the standard render methods.
vtkCoordinate * PositionCoordinate
Definition: vtkActor2D.h:279
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:278
int LayerNumber
Definition: vtkActor2D.h:277
~vtkActor2D() override
double GetHeight()
Set/Get the height and width of the Actor2D.
static vtkActor2D * New()
Creates an actor2D with the following defaults: position (0,0) (coordinate system is viewport); at la...
vtkTypeBool HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
int RenderOverlay(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:270
void SetWidth(double w)
Set/Get the height and width of the Actor2D.
vtkMapper2D * Mapper
Definition: vtkActor2D.h:276
vtkProperty2D * GetProperty()
Returns this actor's vtkProperty2D.
virtual void SetProperty(vtkProperty2D *)
Set this vtkProp's vtkProperty2D.
vtkCoordinate * Position2Coordinate
Definition: vtkActor2D.h:280
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.
virtual vtkCoordinate * GetActualPositionCoordinate()
Return the actual vtkCoordinate reference that the mapper should use to position the actor.
Definition: vtkActor2D.h:263
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:108
abstract class specifies interface for objects which render 2D actors
Definition: vtkMapper2D.h:26
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:64
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
#define VTK_MARSHALAUTO