VTK  9.5.2
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
25
26#ifndef vtkActor_h
27#define vtkActor_h
28
29#include "vtkProp3D.h"
30#include "vtkRenderingCoreModule.h" // For export macro
31#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
32
33VTK_ABI_NAMESPACE_BEGIN
34class vtkRenderer;
37class vtkTexture;
38class vtkMapper;
39class vtkProperty;
40
41class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkActor : public vtkProp3D
42{
43public:
44 vtkTypeMacro(vtkActor, vtkProp3D);
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46
52 static vtkActor* New();
53
60
62
65 int RenderOpaqueGeometry(vtkViewport* viewport) override;
68
70
76
83 virtual void Render(vtkRenderer*, vtkMapper*) {}
84
88 void ShallowCopy(vtkProp* prop) override;
89
96
98
108
115
117
124 vtkGetObjectMacro(BackfaceProperty, vtkProperty);
126
128
133 virtual void SetTexture(vtkTexture*);
134 vtkGetObjectMacro(Texture, vtkTexture);
136
143 virtual void SetMapper(vtkMapper*);
144
146
149 vtkGetObjectMacro(Mapper, vtkMapper);
151
157 double* GetBounds() VTK_SIZEHINT(6) override;
158
167 virtual void ApplyProperties() {}
168
173
181
183
186 vtkGetMacro(ForceOpaque, bool);
187 vtkSetMacro(ForceOpaque, bool);
188 vtkBooleanMacro(ForceOpaque, bool);
189 vtkGetMacro(ForceTranslucent, bool);
190 vtkSetMacro(ForceTranslucent, bool);
191 vtkBooleanMacro(ForceTranslucent, bool);
193
200 bool GetSupportsSelection() override;
201
207 vtkHardwareSelector* sel, std::vector<unsigned int>& pixeloffsets) override;
208
210 // Get if we are in the translucent polygonal geometry pass
214
215protected:
217 ~vtkActor() override;
218
219 // is this actor opaque
224
229
230 // Bounds are cached in an actor - the MapperBounds are also cache to
231 // help know when the Bounds need to be recomputed.
232 double MapperBounds[6];
234
235private:
236 vtkActor(const vtkActor&) = delete;
237 void operator=(const vtkActor&) = delete;
238};
239
240VTK_ABI_NAMESPACE_END
241#endif
an ordered list of actors
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:83
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:223
double MapperBounds[6]
Definition vtkActor.h:232
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:226
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
virtual void ApplyProperties()
Apply the current properties to all parts that compose this actor.
Definition vtkActor.h:167
vtkTimeStamp BoundsMTime
Definition vtkActor.h:233
bool ForceOpaque
Definition vtkActor.h:221
bool IsRenderingTranslucentPolygonalGeometry() override
Definition vtkActor.h:211
double * GetBounds() override
Return a reference to the Prop3D's composite transform.
vtkTexture * Texture
Definition vtkActor.h:227
vtkProperty * Property
Definition vtkActor.h:225
int GetIsOpaque()
vtkMapper * Mapper
Definition vtkActor.h:228
bool ForceTranslucent
Definition vtkActor.h:222
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:212
a simple class to control print indentation
Definition vtkIndent.h:29
abstract class specifies interface to map data to graphics primitives
Definition vtkMapper.h:79
void GetBounds(double bounds[6])
Return a reference to the Prop3D's composite transform.
an ordered list of Props
represent surface properties of a geometric object
Definition vtkProperty.h:61
abstract specification for renderers
Definition vtkRenderer.h:60
handles properties associated with a texture map
Definition vtkTexture.h:59
record modification and/or execution time
abstract specification for Viewports
Definition vtkViewport.h:47
window superclass for vtkRenderWindow
Definition vtkWindow.h:26
int vtkTypeBool
Definition vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287
#define VTK_SIZEHINT(...)
#define VTK_MARSHALAUTO