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 =========================================================================*/
37 #ifndef __vtkActor_h
38 #define __vtkActor_h
39 
40 #include "vtkProp3D.h"
41 
42 class vtkRenderer;
43 class vtkPropCollection;
44 class vtkActorCollection;
45 class vtkTexture;
46 class vtkMapper;
47 class vtkProperty;
48 
50 {
51 public:
52  vtkTypeMacro(vtkActor,vtkProp3D);
53  void PrintSelf(ostream& os, vtkIndent indent);
54 
58  static vtkActor *New();
59 
63  virtual void GetActors(vtkPropCollection *);
64 
66 
67  virtual int RenderOpaqueGeometry(vtkViewport *viewport);
68  virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport);
70 
72  virtual int HasTranslucentPolygonalGeometry();
73 
79  virtual void Render(vtkRenderer *, vtkMapper *) {}
80 
82  void ShallowCopy(vtkProp *prop);
83 
88 
90 
95  void SetProperty(vtkProperty *lut);
96  vtkProperty *GetProperty();
98 
102  virtual vtkProperty* MakeProperty();
103 
105 
109  void SetBackfaceProperty(vtkProperty *lut);
110  vtkGetObjectMacro(BackfaceProperty,vtkProperty);
112 
114 
117  virtual void SetTexture(vtkTexture*);
118  vtkGetObjectMacro(Texture,vtkTexture);
120 
125  virtual void SetMapper(vtkMapper *);
126 
128 
129  vtkGetObjectMacro(Mapper,vtkMapper);
131 
133 
136  void GetBounds(double bounds[6]) {this->vtkProp3D::GetBounds( bounds );}
137  double *GetBounds();
139 
146  virtual void ApplyProperties() {}
147 
149  unsigned long int GetMTime();
150 
155  virtual unsigned long GetRedrawMTime();
156 
158 
162  VTK_LEGACY(virtual void InitPartTraversal());
163  VTK_LEGACY(virtual vtkActor *GetNextPart());
164  VTK_LEGACY(virtual int GetNumberOfParts());
166 
171  virtual bool GetSupportsSelection();
172 
173 protected:
174  vtkActor();
175  ~vtkActor();
176 
181 
182  // is this actor opaque
183  int GetIsOpaque();
184 
185  // Bounds are cached in an actor - the MapperBounds are also cache to
186  // help know when the Bounds need to be recomputed.
187  double MapperBounds[6];
189 
190 private:
191  vtkActor(const vtkActor&); // Not implemented.
192  void operator=(const vtkActor&); // Not implemented.
193 };
194 
195 #endif
196 
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:49
virtual void Render(vtkRenderer *, vtkMapper *)
Definition: vtkActor.h:79
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:49
vtkTimeStamp BoundsMTime
Definition: vtkActor.h:188
abstract specification for Viewports
Definition: vtkViewport.h:45
represent surface properties of a geometric object
Definition: vtkProperty.h:61
virtual int RenderOpaqueGeometry(vtkViewport *)
Definition: vtkProp.h:171
virtual int HasTranslucentPolygonalGeometry()
Definition: vtkProp.h:230
record modification and/or execution time
Definition: vtkTimeStamp.h:33
vtkProperty * Property
Definition: vtkActor.h:177
virtual bool GetSupportsSelection()
Definition: vtkProp.h:330
abstract specification for renderers
Definition: vtkRenderer.h:69
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:41
vtkTexture * Texture
Definition: vtkActor.h:179
a list of Props
virtual void ReleaseGraphicsResources(vtkWindow *)
Definition: vtkProp.h:236
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
void ShallowCopy(vtkProp *prop)
a simple class to control print indentation
Definition: vtkIndent.h:37
void PrintSelf(ostream &os, vtkIndent indent)
vtkProperty * BackfaceProperty
Definition: vtkActor.h:178
void GetBounds(double bounds[6])
Definition: vtkActor.h:136
virtual unsigned long GetRedrawMTime()
Definition: vtkProp.h:99
handles properties associated with a texture map
Definition: vtkTexture.h:68
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:85
a list of actors
#define VTK_RENDERING_EXPORT
virtual void ApplyProperties()
Definition: vtkActor.h:146
vtkMapper * Mapper
Definition: vtkActor.h:180
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
Definition: vtkProp.h:172
virtual double * GetBounds()=0
static vtkObject * New()
unsigned long int GetMTime()
virtual void GetActors(vtkPropCollection *)
Definition: vtkProp.h:59