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 "vtkRenderingCoreModule.h" // For export macro
40 #include "vtkObject.h"
41 
42 class vtkAssemblyPath;
43 class vtkAssemblyPaths;
44 class vtkMatrix4x4;
45 class vtkPropCollection;
46 class vtkViewport;
47 class vtkWindow;
48 class vtkInformation;
51 
53 {
54 public:
55  vtkTypeMacro(vtkProp, vtkObject);
56  void PrintSelf(ostream& os, vtkIndent indent);
57 
59 
62  virtual void GetActors(vtkPropCollection *) {}
63  virtual void GetActors2D(vtkPropCollection *) {}
64  virtual void GetVolumes(vtkPropCollection *) {}
66 
68 
69  vtkSetMacro(Visibility, int);
70  vtkGetMacro(Visibility, int);
71  vtkBooleanMacro(Visibility, int);
73 
75 
78  vtkSetMacro(Pickable, int);
79  vtkGetMacro(Pickable, int);
80  vtkBooleanMacro(Pickable, int);
82 
84  virtual void Pick();
85 
87 
93  vtkSetMacro(Dragable, int);
94  vtkGetMacro(Dragable, int);
95  vtkBooleanMacro(Dragable, int);
97 
99 
103  virtual unsigned long GetRedrawMTime()
104  { return this->GetMTime(); }
106 
108 
112  vtkSetMacro(UseBounds, bool);
113  vtkGetMacro(UseBounds, bool);
114  vtkBooleanMacro(UseBounds, bool);
116 
118 
120  virtual double *GetBounds()
121  { return NULL; }
123 
125  virtual void ShallowCopy(vtkProp *prop);
126 
128 
139  virtual void InitPathTraversal();
140  virtual vtkAssemblyPath *GetNextPath();
141  virtual int GetNumberOfPaths()
142  { return 1; }
144 
146 
149  virtual void PokeMatrix(vtkMatrix4x4 *vtkNotUsed(matrix)) {}
151  { return NULL; }
153 
155 
159  vtkGetObjectMacro(PropertyKeys,vtkInformation);
160  virtual void SetPropertyKeys(vtkInformation *keys);
162 
165  virtual bool HasKeys(vtkInformation *requiredKeys);
166 
173  static vtkInformationIntegerKey *GeneralTextureUnit();
174 
181  static vtkInformationDoubleVectorKey *GeneralTextureTransform();
182 
183 //BTX
185 
199  { return 0; }
201  { return 0; }
203  { return 0; }
204  virtual int RenderOverlay(vtkViewport *)
205  { return 0; }
207 
209 
215  virtual bool RenderFilteredOpaqueGeometry(vtkViewport *v,
216  vtkInformation *requiredKeys);
218 
220 
226  virtual bool RenderFilteredTranslucentPolygonalGeometry(
227  vtkViewport *v,
228  vtkInformation *requiredKeys);
230 
232 
238  virtual bool RenderFilteredVolumetricGeometry(vtkViewport *v,
239  vtkInformation *requiredKeys);
241 
243 
249  virtual bool RenderFilteredOverlay(vtkViewport *v,
250  vtkInformation *requiredKeys);
252 
254 
263  { return 0; }
265 
271 
273 
284  { return this->EstimatedRenderTime; }
285  virtual double GetEstimatedRenderTime()
286  { return this->EstimatedRenderTime; }
288 
290 
294  virtual void SetEstimatedRenderTime(double t)
295  { this->EstimatedRenderTime = t; this->SavedEstimatedRenderTime = t; }
297 
299 
305  { this->EstimatedRenderTime = this->SavedEstimatedRenderTime; }
307 
308 
310 
320  virtual void AddEstimatedRenderTime(double t, vtkViewport *vtkNotUsed(vp))
321  { this->EstimatedRenderTime += t; }
323 
325 
332  virtual void SetAllocatedRenderTime(double t, vtkViewport *vtkNotUsed(v))
333  {
334  this->AllocatedRenderTime = t;
335  this->SavedEstimatedRenderTime = this->EstimatedRenderTime;
336  this->EstimatedRenderTime = 0.0;
337  }
339 
341 
343  vtkGetMacro(AllocatedRenderTime, double);
345 
347 
351  void SetRenderTimeMultiplier( double t )
352  { this->RenderTimeMultiplier = t; }
353  vtkGetMacro(RenderTimeMultiplier, double);
355 
359  virtual void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path);
360 
362 
366  virtual bool GetSupportsSelection()
367  { return false; }
369 
371 
372  vtkGetMacro(NumberOfConsumers,int);
374 
376 
377  void AddConsumer(vtkObject *c);
378  void RemoveConsumer(vtkObject *c);
379  vtkObject *GetConsumer(int i);
380  int IsConsumer(vtkObject *c);
382 
383 //ETX
384 
385 protected:
386  vtkProp();
387  ~vtkProp();
388 
390  int Pickable;
391  int Dragable;
392  bool UseBounds;
393 
398 
399  // how many consumers does this object have
402 
403  // support multi-part props and access to paths of prop
404  // stuff that follows is used to build the assembly hierarchy
406 
408 
409 private:
410  vtkProp(const vtkProp&); // Not implemented.
411  void operator=(const vtkProp&); // Not implemented.
412 };
413 
414 #endif
virtual void SetEstimatedRenderTime(double t)
Definition: vtkProp.h:294
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:52
virtual vtkMatrix4x4 * GetMatrix()
Definition: vtkProp.h:150
abstract base class for most VTK objects
Definition: vtkObject.h:61
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:38
virtual double GetEstimatedRenderTime()
Definition: vtkProp.h:285
Store vtkAlgorithm input/output information.
double EstimatedRenderTime
Definition: vtkProp.h:395
abstract specification for Viewports
Definition: vtkViewport.h:46
virtual int RenderOpaqueGeometry(vtkViewport *)
Definition: vtkProp.h:198
virtual int HasTranslucentPolygonalGeometry()
Definition: vtkProp.h:262
int NumberOfConsumers
Definition: vtkProp.h:400
virtual int RenderOverlay(vtkViewport *)
Definition: vtkProp.h:204
virtual void SetAllocatedRenderTime(double t, vtkViewport *vtkNotUsed(v))
Definition: vtkProp.h:332
virtual bool GetSupportsSelection()
Definition: vtkProp.h:366
int Dragable
Definition: vtkProp.h:391
virtual double GetEstimatedRenderTime(vtkViewport *)
Definition: vtkProp.h:283
double AllocatedRenderTime
Definition: vtkProp.h:394
virtual void AddEstimatedRenderTime(double t, vtkViewport *vtkNotUsed(vp))
Definition: vtkProp.h:320
a list of Props
virtual void ReleaseGraphicsResources(vtkWindow *)
Definition: vtkProp.h:270
virtual double * GetBounds()
Definition: vtkProp.h:120
double SavedEstimatedRenderTime
Definition: vtkProp.h:396
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
virtual int RenderVolumetricGeometry(vtkViewport *)
Definition: vtkProp.h:202
Key for double vector values.
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:38
Key for integer values in vtkInformation.
virtual void GetVolumes(vtkPropCollection *)
Definition: vtkProp.h:64
int Pickable
Definition: vtkProp.h:390
virtual unsigned long GetRedrawMTime()
Definition: vtkProp.h:103
a list of lists of props representing an assembly hierarchy
vtkAssemblyPaths * Paths
Definition: vtkProp.h:405
vtkObject ** Consumers
Definition: vtkProp.h:401
void SetRenderTimeMultiplier(double t)
Definition: vtkProp.h:351
virtual void GetActors2D(vtkPropCollection *)
Definition: vtkProp.h:63
#define VTKRENDERINGCORE_EXPORT
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
Definition: vtkProp.h:200
virtual void RestoreEstimatedRenderTime()
Definition: vtkProp.h:304
virtual void PokeMatrix(vtkMatrix4x4 *vtkNotUsed(matrix))
Definition: vtkProp.h:149
virtual int GetNumberOfPaths()
Definition: vtkProp.h:141
double RenderTimeMultiplier
Definition: vtkProp.h:397
int Visibility
Definition: vtkProp.h:389
vtkInformation * PropertyKeys
Definition: vtkProp.h:407
virtual void GetActors(vtkPropCollection *)
Definition: vtkProp.h:62
bool UseBounds
Definition: vtkProp.h:392