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 =========================================================================*/
34 #ifndef vtkProp_h
35 #define vtkProp_h
36 
37 #include "vtkRenderingCoreModule.h" // For export macro
38 #include "vtkObject.h"
39 
40 class vtkAssemblyPath;
41 class vtkAssemblyPaths;
42 class vtkMatrix4x4;
43 class vtkPropCollection;
44 class vtkViewport;
45 class vtkWindow;
46 class vtkInformation;
49 
50 class VTKRENDERINGCORE_EXPORT vtkProp : public vtkObject
51 {
52 public:
53  vtkTypeMacro(vtkProp, vtkObject);
54  void PrintSelf(ostream& os, vtkIndent indent);
55 
61  virtual void GetActors(vtkPropCollection *) {}
62  virtual void GetActors2D(vtkPropCollection *) {}
63  virtual void GetVolumes(vtkPropCollection *) {}
64 
66 
69  vtkSetMacro(Visibility, int);
70  vtkGetMacro(Visibility, int);
71  vtkBooleanMacro(Visibility, int);
73 
75 
80  vtkSetMacro(Pickable, int);
81  vtkGetMacro(Pickable, int);
82  vtkBooleanMacro(Pickable, int);
84 
88  virtual void Pick();
89 
91 
100  vtkSetMacro(Dragable, int);
101  vtkGetMacro(Dragable, int);
102  vtkBooleanMacro(Dragable, int);
104 
112  { return this->GetMTime(); }
113 
115 
121  vtkSetMacro(UseBounds, bool);
122  vtkGetMacro(UseBounds, bool);
123  vtkBooleanMacro(UseBounds, bool);
125 
130  virtual double *GetBounds()
131  { return NULL; }
132 
136  virtual void ShallowCopy(vtkProp *prop);
137 
139 
151  virtual void InitPathTraversal();
152  virtual vtkAssemblyPath *GetNextPath();
153  virtual int GetNumberOfPaths()
154  { return 1; }
156 
162  virtual void PokeMatrix(vtkMatrix4x4 *vtkNotUsed(matrix)) {}
164  { return NULL; }
165 
167 
174  vtkGetObjectMacro(PropertyKeys,vtkInformation);
175  virtual void SetPropertyKeys(vtkInformation *keys);
177 
182  virtual bool HasKeys(vtkInformation *requiredKeys);
183 
193  static vtkInformationIntegerKey *GeneralTextureUnit();
194 
204  static vtkInformationDoubleVectorKey *GeneralTextureTransform();
205 
223  { return 0; }
225  { return 0; }
227  { return 0; }
228  virtual int RenderOverlay(vtkViewport *)
229  { return 0; }
230 
240  virtual bool RenderFilteredOpaqueGeometry(vtkViewport *v,
241  vtkInformation *requiredKeys);
242 
253  virtual bool RenderFilteredTranslucentPolygonalGeometry(
254  vtkViewport *v,
255  vtkInformation *requiredKeys);
256 
267  virtual bool RenderFilteredVolumetricGeometry(vtkViewport *v,
268  vtkInformation *requiredKeys);
269 
280  virtual bool RenderFilteredOverlay(vtkViewport *v,
281  vtkInformation *requiredKeys);
282 
295  { return 0; }
296 
304 
318  { return this->EstimatedRenderTime; }
319  virtual double GetEstimatedRenderTime()
320  { return this->EstimatedRenderTime; }
321 
329  virtual void SetEstimatedRenderTime(double t)
330  { this->EstimatedRenderTime = t; this->SavedEstimatedRenderTime = t; }
331 
341  { this->EstimatedRenderTime = this->SavedEstimatedRenderTime; }
342 
343 
357  virtual void AddEstimatedRenderTime(double t, vtkViewport *vtkNotUsed(vp))
358  { this->EstimatedRenderTime += t; }
359 
361 
371  virtual void SetAllocatedRenderTime(double t, vtkViewport *vtkNotUsed(v))
372  {
373  this->AllocatedRenderTime = t;
374  this->SavedEstimatedRenderTime = this->EstimatedRenderTime;
375  this->EstimatedRenderTime = 0.0;
376  }
378 
380 
384  vtkGetMacro(AllocatedRenderTime, double);
386 
394  void SetRenderTimeMultiplier( double t )
395  { this->RenderTimeMultiplier = t; }
396  vtkGetMacro(RenderTimeMultiplier, double);
397 
403  virtual void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path);
404 
411  virtual bool GetSupportsSelection()
412  { return false; }
413 
415 
418  vtkGetMacro(NumberOfConsumers,int);
420 
422 
425  void AddConsumer(vtkObject *c);
426  void RemoveConsumer(vtkObject *c);
427  vtkObject *GetConsumer(int i);
428  int IsConsumer(vtkObject *c);
430 
431 protected:
432  vtkProp();
433  ~vtkProp();
434 
436  int Pickable;
437  int Dragable;
438  bool UseBounds;
439 
444 
445  // how many consumers does this object have
448 
449  // support multi-part props and access to paths of prop
450  // stuff that follows is used to build the assembly hierarchy
452 
454 
455 private:
456  vtkProp(const vtkProp&) VTK_DELETE_FUNCTION;
457  void operator=(const vtkProp&) VTK_DELETE_FUNCTION;
458 };
459 
460 #endif
virtual void SetEstimatedRenderTime(double t)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:329
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:50
virtual vtkMatrix4x4 * GetMatrix()
Definition: vtkProp.h:163
abstract base class for most VTK objects
Definition: vtkObject.h:59
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:41
virtual double GetEstimatedRenderTime()
Definition: vtkProp.h:319
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Store vtkAlgorithm input/output information.
double EstimatedRenderTime
Definition: vtkProp.h:441
abstract specification for Viewports
Definition: vtkViewport.h:47
virtual int RenderOpaqueGeometry(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:222
virtual int HasTranslucentPolygonalGeometry()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:294
int NumberOfConsumers
Definition: vtkProp.h:446
virtual int RenderOverlay(vtkViewport *)
Definition: vtkProp.h:228
virtual void SetAllocatedRenderTime(double t, vtkViewport *vtkNotUsed(v))
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
Definition: vtkProp.h:371
virtual bool GetSupportsSelection()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
Definition: vtkProp.h:411
int Dragable
Definition: vtkProp.h:437
virtual double GetEstimatedRenderTime(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:317
double AllocatedRenderTime
Definition: vtkProp.h:440
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
virtual void AddEstimatedRenderTime(double t, vtkViewport *vtkNotUsed(vp))
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
Definition: vtkProp.h:357
a 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:303
virtual double * GetBounds()
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
Definition: vtkProp.h:130
double SavedEstimatedRenderTime
Definition: vtkProp.h:442
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
virtual vtkMTimeType GetRedrawMTime()
Return the mtime of anything that would cause the rendered image to appear differently.
Definition: vtkProp.h:111
virtual int RenderVolumetricGeometry(vtkViewport *)
Definition: vtkProp.h:226
Key for double vector values.
a list of nodes that form an assembly path
a simple class to control print indentation
Definition: vtkIndent.h:39
Key for integer values in vtkInformation.
virtual vtkMTimeType GetMTime()
Return this object's modified time.
virtual void GetVolumes(vtkPropCollection *)
Definition: vtkProp.h:63
int Pickable
Definition: vtkProp.h:436
a list of lists of props representing an assembly hierarchy
vtkAssemblyPaths * Paths
Definition: vtkProp.h:451
vtkObject ** Consumers
Definition: vtkProp.h:447
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void SetRenderTimeMultiplier(double t)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
Definition: vtkProp.h:394
virtual void GetActors2D(vtkPropCollection *)
Definition: vtkProp.h:62
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
Definition: vtkProp.h:224
virtual void RestoreEstimatedRenderTime()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:340
virtual void PokeMatrix(vtkMatrix4x4 *vtkNotUsed(matrix))
These methods are used by subclasses to place a matrix (if any) in the prop prior to rendering...
Definition: vtkProp.h:162
virtual int GetNumberOfPaths()
vtkProp and its subclasses can be picked by subclasses of vtkAbstractPicker (e.g., vtkPropPicker).
Definition: vtkProp.h:153
double RenderTimeMultiplier
Definition: vtkProp.h:443
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
int Visibility
Definition: vtkProp.h:435
vtkInformation * PropertyKeys
Definition: vtkProp.h:453
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:61
bool UseBounds
Definition: vtkProp.h:438