VTK  9.3.0
vtkActor.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
35#ifndef vtkActor_h
36#define vtkActor_h
37
38#include "vtkProp3D.h"
39#include "vtkRenderingCoreModule.h" // For export macro
40
41VTK_ABI_NAMESPACE_BEGIN
42class vtkRenderer;
45class vtkTexture;
46class vtkMapper;
47class vtkProperty;
48
49class VTKRENDERINGCORE_EXPORT vtkActor : public vtkProp3D
50{
51public:
52 vtkTypeMacro(vtkActor, vtkProp3D);
53 void PrintSelf(ostream& os, vtkIndent indent) override;
54
60 static vtkActor* New();
61
68
70
73 int RenderOpaqueGeometry(vtkViewport* viewport) override;
76
78
84
91 virtual void Render(vtkRenderer*, vtkMapper*) {}
92
96 void ShallowCopy(vtkProp* prop) override;
97
104
106
116
123
125
132 vtkGetObjectMacro(BackfaceProperty, vtkProperty);
134
136
141 virtual void SetTexture(vtkTexture*);
142 vtkGetObjectMacro(Texture, vtkTexture);
144
151 virtual void SetMapper(vtkMapper*);
152
154
157 vtkGetObjectMacro(Mapper, vtkMapper);
159
164 using Superclass::GetBounds;
165 double* GetBounds() VTK_SIZEHINT(6) override;
166
175 virtual void ApplyProperties() {}
176
181
189
191
194 vtkGetMacro(ForceOpaque, bool);
195 vtkSetMacro(ForceOpaque, bool);
196 vtkBooleanMacro(ForceOpaque, bool);
197 vtkGetMacro(ForceTranslucent, bool);
198 vtkSetMacro(ForceTranslucent, bool);
199 vtkBooleanMacro(ForceTranslucent, bool);
201
208 bool GetSupportsSelection() override;
209
215 vtkHardwareSelector* sel, std::vector<unsigned int>& pixeloffsets) override;
216
218 // Get if we are in the translucent polygonal geometry pass
219 bool IsRenderingTranslucentPolygonalGeometry() override { return this->InTranslucentPass; }
220 void SetIsRenderingTranslucentPolygonalGeometry(bool val) { this->InTranslucentPass = val; }
222
223protected:
225 ~vtkActor() override;
226
227 // is this actor opaque
232
237
238 // Bounds are cached in an actor - the MapperBounds are also cache to
239 // help know when the Bounds need to be recomputed.
240 double MapperBounds[6];
242
243private:
244 vtkActor(const vtkActor&) = delete;
245 void operator=(const vtkActor&) = delete;
246};
247
248VTK_ABI_NAMESPACE_END
249#endif
an ordered list of actors
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:50
void SetProperty(vtkProperty *lut)
Set/Get the property object that controls this actors surface properties.
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
void GetActors(vtkPropCollection *) override
For some exporters and other other operations we must be able to collect all the actors or volumes.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMTimeType GetRedrawMTime() override
Return the mtime of anything that would cause the rendered image to appear differently.
virtual void Render(vtkRenderer *, vtkMapper *)
This causes the actor to be rendered.
Definition vtkActor.h:91
void ProcessSelectorPixelBuffers(vtkHardwareSelector *sel, std::vector< unsigned int > &pixeloffsets) override
allows a prop to update a selections color buffers Default just forwards to the Mapper
virtual void SetMapper(vtkMapper *)
This is the method that is used to connect an actor to the end of a visualization pipeline,...
vtkTypeBool HasTranslucentPolygonalGeometry() override
Does this prop have some opaque/translucent polygonal geometry?
vtkMTimeType GetMTime() override
Get the actors mtime plus consider its properties and texture if set.
bool InTranslucentPass
Definition vtkActor.h:231
vtkProperty * GetProperty()
Set/Get the property object that controls this actors surface properties.
virtual vtkProperty * MakeProperty()
Create a new property suitable for use with this type of Actor.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Support the standard render methods.
vtkProperty * BackfaceProperty
Definition vtkActor.h:234
void SetBackfaceProperty(vtkProperty *lut)
Set/Get the property object that controls this actors backface surface properties.
vtkTypeBool HasOpaqueGeometry() override
Does this prop have some opaque/translucent polygonal geometry?
~vtkActor() override
vtkTimeStamp BoundsMTime
Definition vtkActor.h:241
bool ForceOpaque
Definition vtkActor.h:229
bool IsRenderingTranslucentPolygonalGeometry() override
Definition vtkActor.h:219
double * GetBounds() override
Return a reference to the Prop3D's composite transform.
vtkTexture * Texture
Definition vtkActor.h:235
vtkProperty * Property
Definition vtkActor.h:233
int GetIsOpaque()
vtkMapper * Mapper
Definition vtkActor.h:236
bool ForceTranslucent
Definition vtkActor.h:230
static vtkActor * New()
Creates an actor with the following defaults: origin(0,0,0) position=(0,0,0) scale=(1,...
void ShallowCopy(vtkProp *prop) override
Shallow copy of an actor.
virtual void SetTexture(vtkTexture *)
Set/Get the texture object to control rendering texture maps.
bool GetSupportsSelection() override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Support the standard render methods.
void SetIsRenderingTranslucentPolygonalGeometry(bool val)
Definition vtkActor.h:220
a simple class to control print indentation
Definition vtkIndent.h:38
abstract class specifies interface to map data to graphics primitives
Definition vtkMapper.h:86
represents an 3D object for placement in a rendered scene
Definition vtkProp3D.h:48
an ordered list of Props
abstract superclass for all actors, volumes and annotations
Definition vtkProp.h:52
represent surface properties of a geometric object
Definition vtkProperty.h:66
abstract specification for renderers
Definition vtkRenderer.h:68
handles properties associated with a texture map
Definition vtkTexture.h:67
record modification and/or execution time
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
#define VTK_SIZEHINT(...)