VTK
vtkProp.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkProp.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 =========================================================================*/
36 #ifndef __vtkProp_h
37 #define __vtkProp_h
38 
39 #include "vtkObject.h"
40 
41 class vtkAssemblyPath;
42 class vtkAssemblyPaths;
43 class vtkMatrix4x4;
44 class vtkPropCollection;
45 class vtkViewport;
46 class vtkWindow;
47 class vtkInformation;
48 
50 {
51 public:
52  vtkTypeMacro(vtkProp,vtkObject);
53  void PrintSelf(ostream& os, vtkIndent indent);
54 
56 
59  virtual void GetActors(vtkPropCollection *) {}
60  virtual void GetActors2D(vtkPropCollection *) {}
61  virtual void GetVolumes(vtkPropCollection *) {}
63 
65 
66  vtkSetMacro(Visibility, int);
67  vtkGetMacro(Visibility, int);
68  vtkBooleanMacro(Visibility, int);
70 
72 
75  vtkSetMacro(Pickable,int);
76  vtkGetMacro(Pickable,int);
77  vtkBooleanMacro(Pickable,int);
79 
81  virtual void Pick();
82 
84 
90  vtkSetMacro(Dragable,int);
91  vtkGetMacro(Dragable,int);
92  vtkBooleanMacro(Dragable,int);
94 
99  virtual unsigned long GetRedrawMTime() {return this->GetMTime();}
100 
102 
106  vtkSetMacro(UseBounds,bool);
107  vtkGetMacro(UseBounds,bool);
108  vtkBooleanMacro(UseBounds,bool);
110 
113  virtual double *GetBounds() {return NULL;}
114 
116  virtual void ShallowCopy(vtkProp *prop);
117 
119 
130  virtual void InitPathTraversal();
131  virtual vtkAssemblyPath *GetNextPath();
132  virtual int GetNumberOfPaths() {return 1;}
134 
136 
139  virtual void PokeMatrix(vtkMatrix4x4 *vtkNotUsed(matrix)) {}
140  virtual vtkMatrix4x4 *GetMatrix() {return NULL;}
142 
144 
148  vtkGetObjectMacro(PropertyKeys,vtkInformation);
149  virtual void SetPropertyKeys(vtkInformation *keys);
151 
154  virtual bool HasKeys(vtkInformation *requiredKeys);
155 
156 //BTX
158 
171  virtual int RenderOpaqueGeometry( vtkViewport *) { return 0; }
172  virtual int RenderTranslucentPolygonalGeometry( vtkViewport *) { return 0; }
173  virtual int RenderVolumetricGeometry( vtkViewport *) { return 0; }
174  virtual int RenderOverlay( vtkViewport *) { return 0; }
176 
178 
184  virtual bool RenderFilteredOpaqueGeometry(vtkViewport *v,
185  vtkInformation *requiredKeys);
187 
189 
195  virtual bool RenderFilteredTranslucentPolygonalGeometry(
196  vtkViewport *v,
197  vtkInformation *requiredKeys);
199 
201 
207  virtual bool RenderFilteredVolumetricGeometry(vtkViewport *v,
208  vtkInformation *requiredKeys);
210 
212 
218  virtual bool RenderFilteredOverlay(vtkViewport *v,
219  vtkInformation *requiredKeys);
221 
230  virtual int HasTranslucentPolygonalGeometry() { return 0; }
231 
237 
239 
250  { return this->EstimatedRenderTime; }
251  virtual double GetEstimatedRenderTime(){ return this->EstimatedRenderTime; }
253 
255 
259  virtual void SetEstimatedRenderTime(double t)
260  {this->EstimatedRenderTime = t; this->SavedEstimatedRenderTime = t;}
262 
264 
270  { this->EstimatedRenderTime = this->SavedEstimatedRenderTime; }
272 
273 
275 
285  virtual void AddEstimatedRenderTime(double t, vtkViewport *vtkNotUsed(vp))
286  {this->EstimatedRenderTime+=t;}
288 
290 
297  virtual void SetAllocatedRenderTime(double t, vtkViewport *vtkNotUsed(v))
298  {
299  this->AllocatedRenderTime = t;
300  this->SavedEstimatedRenderTime = this->EstimatedRenderTime;
301  this->EstimatedRenderTime = 0.0;
302  }
304 
306 
308  vtkGetMacro(AllocatedRenderTime, double);
310 
312 
316  void SetRenderTimeMultiplier( double t ) { this->RenderTimeMultiplier = t; }
317  vtkGetMacro(RenderTimeMultiplier, double);
319 
323  virtual void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path);
324 
326 
330  virtual bool GetSupportsSelection()
331  { return false; }
333 
335 
336  vtkGetMacro(NumberOfConsumers,int);
338 
340 
341  void AddConsumer(vtkObject *c);
342  void RemoveConsumer(vtkObject *c);
343  vtkObject *GetConsumer(int i);
344  int IsConsumer(vtkObject *c);
346 
347 //ETX
348 
349 protected:
350  vtkProp();
351  ~vtkProp();
352 
354  int Pickable;
355  int Dragable;
356  bool UseBounds;
357 
362 
363  // how many consumers does this object have
366 
367  // support multi-part props and access to paths of prop
368  // stuff that follows is used to build the assembly hierarchy
370 
372 
373 private:
374  vtkProp(const vtkProp&); // Not implemented.
375  void operator=(const vtkProp&); // Not implemented.
376 };
377 
378 #endif
379 
380 
virtual void SetEstimatedRenderTime(double t)
Definition: vtkProp.h:259
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:49
virtual vtkMatrix4x4 * GetMatrix()
Definition: vtkProp.h:140
abstract base class for most VTK objects
Definition: vtkObject.h:60
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:37
virtual double GetEstimatedRenderTime()
Definition: vtkProp.h:251
Store vtkAlgorithm input/output information.
double EstimatedRenderTime
Definition: vtkProp.h:359
abstract specification for Viewports
Definition: vtkViewport.h:45
virtual int RenderOpaqueGeometry(vtkViewport *)
Definition: vtkProp.h:171
virtual int HasTranslucentPolygonalGeometry()
Definition: vtkProp.h:230
int NumberOfConsumers
Definition: vtkProp.h:364
virtual int RenderOverlay(vtkViewport *)
Definition: vtkProp.h:174
virtual void SetAllocatedRenderTime(double t, vtkViewport *vtkNotUsed(v))
Definition: vtkProp.h:297
virtual bool GetSupportsSelection()
Definition: vtkProp.h:330
int Dragable
Definition: vtkProp.h:355
virtual double GetEstimatedRenderTime(vtkViewport *)
Definition: vtkProp.h:249
double AllocatedRenderTime
Definition: vtkProp.h:358
virtual void AddEstimatedRenderTime(double t, vtkViewport *vtkNotUsed(vp))
Definition: vtkProp.h:285
a list of Props
virtual void ReleaseGraphicsResources(vtkWindow *)
Definition: vtkProp.h:236
virtual double * GetBounds()
Definition: vtkProp.h:113
double SavedEstimatedRenderTime
Definition: vtkProp.h:360
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
virtual int RenderVolumetricGeometry(vtkViewport *)
Definition: vtkProp.h:173
virtual void PrintSelf(ostream &os, vtkIndent indent)
a list of nodes that form an assembly path
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:37
virtual void GetVolumes(vtkPropCollection *)
Definition: vtkProp.h:61
int Pickable
Definition: vtkProp.h:354
virtual unsigned long GetRedrawMTime()
Definition: vtkProp.h:99
#define VTK_COMMON_EXPORT
a list of lists of props representing an assembly hierarchy
vtkAssemblyPaths * Paths
Definition: vtkProp.h:369
vtkObject ** Consumers
Definition: vtkProp.h:365
void SetRenderTimeMultiplier(double t)
Definition: vtkProp.h:316
virtual void GetActors2D(vtkPropCollection *)
Definition: vtkProp.h:60
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
Definition: vtkProp.h:172
virtual void RestoreEstimatedRenderTime()
Definition: vtkProp.h:269
virtual void PokeMatrix(vtkMatrix4x4 *vtkNotUsed(matrix))
Definition: vtkProp.h:139
virtual int GetNumberOfPaths()
Definition: vtkProp.h:132
double RenderTimeMultiplier
Definition: vtkProp.h:361
int Visibility
Definition: vtkProp.h:353
vtkInformation * PropertyKeys
Definition: vtkProp.h:371
virtual void GetActors(vtkPropCollection *)
Definition: vtkProp.h:59
bool UseBounds
Definition: vtkProp.h:356