VTK  9.3.20231130
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 
139 VTK_ABI_NAMESPACE_BEGIN
140 class vtkMapper2D;
141 class vtkProperty2D;
142 
143 class VTKRENDERINGCORE_EXPORT vtkActor2D : public vtkProp
144 {
145 public:
146  void PrintSelf(ostream& os, vtkIndent indent) override;
147  vtkTypeMacro(vtkActor2D, vtkProp);
148 
154  static vtkActor2D* New();
155 
157 
160  int RenderOverlay(vtkViewport* viewport) override;
161  int RenderOpaqueGeometry(vtkViewport* viewport) override;
164 
169 
171 
174  virtual void SetMapper(vtkMapper2D* mapper);
175  vtkGetObjectMacro(Mapper, vtkMapper2D);
177 
179 
182  vtkSetMacro(LayerNumber, int);
183  vtkGetMacro(LayerNumber, int);
185 
191 
195  virtual void SetProperty(vtkProperty2D*);
196 
198 
203  vtkViewportCoordinateMacro(Position);
205 
209  void SetDisplayPosition(int, int);
210 
212 
218  vtkViewportCoordinateMacro(Position2);
220 
222 
227  void SetWidth(double w);
228  double GetWidth();
229  void SetHeight(double h);
230  double GetHeight();
232 
236  vtkMTimeType GetMTime() override;
237 
243  void GetActors2D(vtkPropCollection* pc) override;
244 
248  void ShallowCopy(vtkProp* prop) override;
249 
256 
262  virtual vtkCoordinate* GetActualPositionCoordinate() { return this->PositionCoordinate; }
263 
269  virtual vtkCoordinate* GetActualPosition2Coordinate() { return this->Position2Coordinate; }
270 
271 protected:
273  ~vtkActor2D() override;
274 
280 
281 private:
282  vtkActor2D(const vtkActor2D&) = delete;
283  void operator=(const vtkActor2D&) = delete;
284 };
285 
286 VTK_ABI_NAMESPACE_END
287 #endif
a actor that draws 2D data
Definition: vtkActor2D.h:144
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Support the standard render methods.
vtkCoordinate * PositionCoordinate
Definition: vtkActor2D.h:278
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:277
int LayerNumber
Definition: vtkActor2D.h:276
~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:269
void SetWidth(double w)
Set/Get the height and width of the Actor2D.
vtkMapper2D * Mapper
Definition: vtkActor2D.h:275
vtkProperty2D * GetProperty()
Returns this actor's vtkProperty2D.
virtual void SetProperty(vtkProperty2D *)
Set this vtkProp's vtkProperty2D.
vtkCoordinate * Position2Coordinate
Definition: vtkActor2D.h:279
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:262
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:25
an ordered list of Props
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:65
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:64
window superclass for vtkRenderWindow
Definition: vtkWindow.h:47
int vtkTypeBool
Definition: vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270