VTK  9.1.0
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=========================================================================*/
41#ifndef vtkActor_h
42#define vtkActor_h
43
44#include "vtkProp3D.h"
45#include "vtkRenderingCoreModule.h" // For export macro
46
47class vtkRenderer;
50class vtkTexture;
51class vtkMapper;
52class vtkProperty;
53
54class VTKRENDERINGCORE_EXPORT vtkActor : public vtkProp3D
55{
56public:
57 vtkTypeMacro(vtkActor, vtkProp3D);
58 void PrintSelf(ostream& os, vtkIndent indent) override;
59
65 static vtkActor* New();
66
73
75
78 int RenderOpaqueGeometry(vtkViewport* viewport) override;
81
83
89
96 virtual void Render(vtkRenderer*, vtkMapper*) {}
97
101 void ShallowCopy(vtkProp* prop) override;
102
109
111
121
128
130
137 vtkGetObjectMacro(BackfaceProperty, vtkProperty);
139
141
146 virtual void SetTexture(vtkTexture*);
147 vtkGetObjectMacro(Texture, vtkTexture);
149
156 virtual void SetMapper(vtkMapper*);
157
159
162 vtkGetObjectMacro(Mapper, vtkMapper);
164
170 double* GetBounds() VTK_SIZEHINT(6) override;
171
180 virtual void ApplyProperties() {}
181
186
194
196
199 vtkGetMacro(ForceOpaque, bool);
200 vtkSetMacro(ForceOpaque, bool);
201 vtkBooleanMacro(ForceOpaque, bool);
202 vtkGetMacro(ForceTranslucent, bool);
203 vtkSetMacro(ForceTranslucent, bool);
204 vtkBooleanMacro(ForceTranslucent, bool);
206
213 bool GetSupportsSelection() override;
214
220 vtkHardwareSelector* sel, std::vector<unsigned int>& pixeloffsets) override;
221
223 // Get if we are in the translucent polygonal geometry pass
224 bool IsRenderingTranslucentPolygonalGeometry() override { return this->InTranslucentPass; }
225 void SetIsRenderingTranslucentPolygonalGeometry(bool val) { this->InTranslucentPass = val; }
227
228protected:
230 ~vtkActor() override;
231
232 // is this actor opaque
237
242
243 // Bounds are cached in an actor - the MapperBounds are also cache to
244 // help know when the Bounds need to be recomputed.
245 double MapperBounds[6];
247
248private:
249 vtkActor(const vtkActor&) = delete;
250 void operator=(const vtkActor&) = delete;
251};
252
253#endif
an ordered list of actors
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:55
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:96
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:236
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:239
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:246
bool ForceOpaque
Definition: vtkActor.h:234
bool IsRenderingTranslucentPolygonalGeometry() override
Definition: vtkActor.h:224
double * GetBounds() override
Return a reference to the Prop3D's composite transform.
vtkTexture * Texture
Definition: vtkActor.h:240
vtkProperty * Property
Definition: vtkActor.h:238
int GetIsOpaque()
vtkMapper * Mapper
Definition: vtkActor.h:241
bool ForceTranslucent
Definition: vtkActor.h:235
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:225
a simple class to control print indentation
Definition: vtkIndent.h:43
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:91
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:53
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:71
abstract specification for renderers
Definition: vtkRenderer.h:73
handles properties associated with a texture map
Definition: vtkTexture.h:75
record modification and/or execution time
Definition: vtkTimeStamp.h:42
abstract specification for Viewports
Definition: vtkViewport.h:56
window superclass for vtkRenderWindow
Definition: vtkWindow.h:45
void GetBounds(T a, double bds[6])
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
#define VTK_SIZEHINT(...)