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