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) VTK_OVERRIDE;
50 
56  static vtkActor *New();
57 
63  void GetActors(vtkPropCollection *) VTK_OVERRIDE;
64 
66 
69  int RenderOpaqueGeometry(vtkViewport *viewport) VTK_OVERRIDE;
70  int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) VTK_OVERRIDE;
72 
76  int HasTranslucentPolygonalGeometry() VTK_OVERRIDE;
77 
84  virtual void Render(vtkRenderer *, vtkMapper *) {}
85 
89  void ShallowCopy(vtkProp *prop) VTK_OVERRIDE;
90 
96  void ReleaseGraphicsResources(vtkWindow *) VTK_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_OVERRIDE;
159 
168  virtual void ApplyProperties() {}
169 
173  vtkMTimeType GetMTime() VTK_OVERRIDE;
174 
181  vtkMTimeType GetRedrawMTime() VTK_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() VTK_OVERRIDE;
202 
203 protected:
204  vtkActor();
205  ~vtkActor() VTK_OVERRIDE;
206 
207  // is this actor opaque
208  int GetIsOpaque();
209  bool ForceOpaque;
210  bool ForceTranslucent;
211 
212  vtkProperty *Property;
213  vtkProperty *BackfaceProperty;
214  vtkTexture *Texture;
215  vtkMapper *Mapper;
216 
217  // Bounds are cached in an actor - the MapperBounds are also cache to
218  // help know when the Bounds need to be recomputed.
219  double MapperBounds[6];
220  vtkTimeStamp BoundsMTime;
221 
222 private:
223  vtkActor(const vtkActor&) VTK_DELETE_FUNCTION;
224  void operator=(const vtkActor&) VTK_DELETE_FUNCTION;
225 };
226 
227 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:44
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
double * GetBounds() override=0
Return a reference to the Prop3D's composite transform.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
abstract specification for Viewports
Definition: vtkViewport.h:44
represent surface properties of a geometric object
Definition: vtkProperty.h:58
virtual int RenderOpaqueGeometry(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:216
virtual int HasTranslucentPolygonalGeometry()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:288
record modification and/or execution time
Definition: vtkTimeStamp.h:32
abstract specification for renderers
Definition: vtkRenderer.h:57
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:43
an ordered list of Props
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkProp.h:297
virtual double * GetBounds()
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
Definition: vtkProp.h:124
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
a simple class to control print indentation
Definition: vtkIndent.h:33
void ShallowCopy(vtkProp *prop) override
Shallow copy of this vtkProp3D.
handles properties associated with a texture map
Definition: vtkTexture.h:64
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:85
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
an ordered list of actors
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
Definition: vtkProp.h:218
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
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:55
vtkMTimeType GetMTime() override
Get the vtkProp3D's mtime.