VTK
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 =========================================================================*/
32 #ifndef vtkActor_h
33 #define vtkActor_h
34 
35 #include "vtkRenderingCoreModule.h" // For export macro
36 #include "vtkProp3D.h"
37 
38 class vtkRenderer;
39 class vtkPropCollection;
40 class vtkActorCollection;
41 class vtkTexture;
42 class vtkMapper;
43 class vtkProperty;
44 
45 class VTKRENDERINGCORE_EXPORT vtkActor : public vtkProp3D
46 {
47 public:
48  vtkTypeMacro(vtkActor, vtkProp3D);
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
56  static vtkActor *New();
57 
63  void GetActors(vtkPropCollection *) override;
64 
66 
69  int RenderOpaqueGeometry(vtkViewport *viewport) override;
70  int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override;
72 
76  int HasTranslucentPolygonalGeometry() override;
77 
84  virtual void Render(vtkRenderer *, vtkMapper *) {}
85 
89  void ShallowCopy(vtkProp *prop) override;
90 
96  void ReleaseGraphicsResources(vtkWindow *) override;
97 
99 
106  void SetProperty(vtkProperty *lut);
107  vtkProperty *GetProperty();
109 
115  virtual vtkProperty* MakeProperty();
116 
118 
124  void SetBackfaceProperty(vtkProperty *lut);
125  vtkGetObjectMacro(BackfaceProperty,vtkProperty);
127 
129 
134  virtual void SetTexture(vtkTexture*);
135  vtkGetObjectMacro(Texture, vtkTexture);
137 
144  virtual void SetMapper(vtkMapper *);
145 
147 
150  vtkGetObjectMacro(Mapper, vtkMapper);
152 
157  using Superclass::GetBounds;
158  double *GetBounds() VTK_SIZEHINT(6) override;
159 
168  virtual void ApplyProperties() {}
169 
173  vtkMTimeType GetMTime() override;
174 
181  vtkMTimeType GetRedrawMTime() override;
182 
184 
187  vtkGetMacro(ForceOpaque, bool);
188  vtkSetMacro(ForceOpaque, bool);
189  vtkBooleanMacro(ForceOpaque, bool);
190  vtkGetMacro(ForceTranslucent, bool);
191  vtkSetMacro(ForceTranslucent, bool);
192  vtkBooleanMacro(ForceTranslucent, bool);
194 
201  bool GetSupportsSelection() override;
202 
208  vtkHardwareSelector *sel,
209  std::vector<unsigned int> &pixeloffsets) override;
210 
211 protected:
212  vtkActor();
213  ~vtkActor() override;
214 
215  // is this actor opaque
216  int GetIsOpaque();
219 
224 
225  // Bounds are cached in an actor - the MapperBounds are also cache to
226  // help know when the Bounds need to be recomputed.
227  double MapperBounds[6];
229 
230 private:
231  vtkActor(const vtkActor&) = delete;
232  void operator=(const vtkActor&) = delete;
233 };
234 
235 #endif
vtkActor::Mapper
vtkMapper * Mapper
Definition: vtkActor.h:223
vtkProp3D
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:43
vtkProp::GetSupportsSelection
virtual bool GetSupportsSelection()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
Definition: vtkProp.h:407
vtkProp3D::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:32
vtkProp::RenderOpaqueGeometry
virtual int RenderOpaqueGeometry(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:218
vtkActor::BoundsMTime
vtkTimeStamp BoundsMTime
Definition: vtkActor.h:228
vtkActor::Property
vtkProperty * Property
Definition: vtkActor.h:220
vtkActor::BackfaceProperty
vtkProperty * BackfaceProperty
Definition: vtkActor.h:221
vtkProp3D::GetBounds
double * GetBounds() override=0
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
vtkActor::Texture
vtkTexture * Texture
Definition: vtkActor.h:222
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkTexture
handles properties associated with a texture map
Definition: vtkTexture.h:65
vtkProp::GetActors
virtual void GetActors(vtkPropCollection *)
For some exporters and other other operations we must be able to collect all the actors or volumes.
Definition: vtkProp.h:57
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:42
vtkMapper
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:80
vtkHardwareSelector
Definition: vtkHardwareSelector.h:123
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkProp3D::GetMTime
vtkMTimeType GetMTime() override
Get the vtkProp3D's mtime.
vtkProp::GetBounds
virtual double * GetBounds()
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
Definition: vtkProp.h:126
vtkActor::ForceTranslucent
bool ForceTranslucent
Definition: vtkActor.h:218
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:44
vtkProp::RenderTranslucentPolygonalGeometry
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
Definition: vtkProp.h:220
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:46
vtkProp3D::ShallowCopy
void ShallowCopy(vtkProp *prop) override
Shallow copy of this vtkProp3D.
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:57
vtkActorCollection
an ordered list of actors
Definition: vtkActorCollection.h:36
vtkProp::ProcessSelectorPixelBuffers
virtual void ProcessSelectorPixelBuffers(vtkHardwareSelector *, std::vector< unsigned int > &)
allows a prop to update a selections color buffers
Definition: vtkProp.h:414
vtkProperty
represent surface properties of a geometric object
Definition: vtkProperty.h:60
vtkPropCollection
an ordered list of Props
Definition: vtkPropCollection.h:35
vtkProp::GetRedrawMTime
virtual vtkMTimeType GetRedrawMTime()
Return the mtime of anything that would cause the rendered image to appear differently.
Definition: vtkProp.h:107
vtkProp::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkProp.h:299
vtkProp::HasTranslucentPolygonalGeometry
virtual int HasTranslucentPolygonalGeometry()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:290
vtkActor::ForceOpaque
bool ForceOpaque
Definition: vtkActor.h:217
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
vtkActor::Render
virtual void Render(vtkRenderer *, vtkMapper *)
This causes the actor to be rendered.
Definition: vtkActor.h:84
vtkProp3D.h