VTK  9.2.5
vtkActor.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkActor.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=========================================================================*/
38#ifndef vtkActor_h
39#define vtkActor_h
40
41#include "vtkProp3D.h"
42#include "vtkRenderingCoreModule.h" // For export macro
43
44class vtkRenderer;
47class vtkTexture;
48class vtkMapper;
49class vtkProperty;
50
51class VTKRENDERINGCORE_EXPORT vtkActor : public vtkProp3D
52{
53public:
54 vtkTypeMacro(vtkActor, vtkProp3D);
55 void PrintSelf(ostream& os, vtkIndent indent) override;
56
62 static vtkActor* New();
63
70
72
75 int RenderOpaqueGeometry(vtkViewport* viewport) override;
78
80
86
93 virtual void Render(vtkRenderer*, vtkMapper*) {}
94
98 void ShallowCopy(vtkProp* prop) override;
99
106
108
118
125
127
134 vtkGetObjectMacro(BackfaceProperty, vtkProperty);
136
138
143 virtual void SetTexture(vtkTexture*);
144 vtkGetObjectMacro(Texture, vtkTexture);
146
153 virtual void SetMapper(vtkMapper*);
154
156
159 vtkGetObjectMacro(Mapper, vtkMapper);
161
166 using Superclass::GetBounds;
167 double* GetBounds() VTK_SIZEHINT(6) override;
168
177 virtual void ApplyProperties() {}
178
183
191
193
196 vtkGetMacro(ForceOpaque, bool);
197 vtkSetMacro(ForceOpaque, bool);
198 vtkBooleanMacro(ForceOpaque, bool);
199 vtkGetMacro(ForceTranslucent, bool);
200 vtkSetMacro(ForceTranslucent, bool);
201 vtkBooleanMacro(ForceTranslucent, bool);
203
210 bool GetSupportsSelection() override;
211
217 vtkHardwareSelector* sel, std::vector<unsigned int>& pixeloffsets) override;
218
220 // Get if we are in the translucent polygonal geometry pass
221 bool IsRenderingTranslucentPolygonalGeometry() override { return this->InTranslucentPass; }
222 void SetIsRenderingTranslucentPolygonalGeometry(bool val) { this->InTranslucentPass = val; }
224
225protected:
227 ~vtkActor() override;
228
229 // is this actor opaque
234
239
240 // Bounds are cached in an actor - the MapperBounds are also cache to
241 // help know when the Bounds need to be recomputed.
242 double MapperBounds[6];
244
245private:
246 vtkActor(const vtkActor&) = delete;
247 void operator=(const vtkActor&) = delete;
248};
249
250#endif
an ordered list of actors
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:52
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:93
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:233
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:236
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:243
bool ForceOpaque
Definition: vtkActor.h:231
bool IsRenderingTranslucentPolygonalGeometry() override
Definition: vtkActor.h:221
double * GetBounds() override
Return a reference to the Prop3D's composite transform.
vtkTexture * Texture
Definition: vtkActor.h:237
vtkProperty * Property
Definition: vtkActor.h:235
int GetIsOpaque()
vtkMapper * Mapper
Definition: vtkActor.h:238
bool ForceTranslucent
Definition: vtkActor.h:232
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:222
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:88
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:50
an ordered list of Props
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:57
represent surface properties of a geometric object
Definition: vtkProperty.h:68
abstract specification for renderers
Definition: vtkRenderer.h:73
handles properties associated with a texture map
Definition: vtkTexture.h:69
record modification and/or execution time
Definition: vtkTimeStamp.h:36
abstract specification for Viewports
Definition: vtkViewport.h:56
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
#define VTK_SIZEHINT(...)