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();
211 
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];
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
vtkTimeStamp BoundsMTime
Definition: vtkActor.h:220
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
vtkProperty * Property
Definition: vtkActor.h:212
virtual bool GetSupportsSelection()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
Definition: vtkProp.h:405
abstract specification for renderers
Definition: vtkRenderer.h:57
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:43
vtkTexture * Texture
Definition: vtkActor.h:214
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
virtual vtkMTimeType GetRedrawMTime()
Return the mtime of anything that would cause the rendered image to appear differently.
Definition: vtkProp.h:105
a simple class to control print indentation
Definition: vtkIndent.h:33
void ShallowCopy(vtkProp *prop) override
Shallow copy of this vtkProp3D.
bool ForceTranslucent
Definition: vtkActor.h:210
vtkProperty * BackfaceProperty
Definition: vtkActor.h:213
handles properties associated with a texture map
Definition: vtkTexture.h:64
bool ForceOpaque
Definition: vtkActor.h:209
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
virtual void ApplyProperties()
Apply the current properties to all parts that compose this actor.
Definition: vtkActor.h:168
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMapper * Mapper
Definition: vtkActor.h:215
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.