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 =========================================================================*/
33 #ifndef vtkProp_h
34 #define vtkProp_h
35 
36 #include "vtkRenderingCoreModule.h" // For export macro
37 #include "vtkObject.h"
38 
39 class vtkAssemblyPath;
40 class vtkAssemblyPaths;
41 class vtkMatrix4x4;
42 class vtkPropCollection;
43 class vtkViewport;
44 class vtkWindow;
45 class vtkInformation;
48 
50 {
51 public:
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 
96 
100  virtual unsigned long GetRedrawMTime()
101  { return this->GetMTime(); }
103 
105 
109  vtkSetMacro(UseBounds, bool);
110  vtkGetMacro(UseBounds, bool);
111  vtkBooleanMacro(UseBounds, bool);
113 
115 
117  virtual double *GetBounds()
118  { return NULL; }
120 
122  virtual void ShallowCopy(vtkProp *prop);
123 
125 
136  virtual void InitPathTraversal();
137  virtual vtkAssemblyPath *GetNextPath();
138  virtual int GetNumberOfPaths()
139  { return 1; }
141 
143 
148  { return NULL; }
150 
152 
156  vtkGetObjectMacro(PropertyKeys,vtkInformation);
157  virtual void SetPropertyKeys(vtkInformation *keys);
159 
162  virtual bool HasKeys(vtkInformation *requiredKeys);
163 
170  static vtkInformationIntegerKey *GeneralTextureUnit();
171 
178  static vtkInformationDoubleVectorKey *GeneralTextureTransform();
179 
180 //BTX
182 
196  { return 0; }
198  { return 0; }
200  { return 0; }
201  virtual int RenderOverlay(vtkViewport *)
202  { return 0; }
204 
206 
212  virtual bool RenderFilteredOpaqueGeometry(vtkViewport *v,
213  vtkInformation *requiredKeys);
215 
217 
223  virtual bool RenderFilteredTranslucentPolygonalGeometry(
224  vtkViewport *v,
225  vtkInformation *requiredKeys);
227 
229 
235  virtual bool RenderFilteredVolumetricGeometry(vtkViewport *v,
236  vtkInformation *requiredKeys);
238 
240 
246  virtual bool RenderFilteredOverlay(vtkViewport *v,
247  vtkInformation *requiredKeys);
249 
251 
260  { return 0; }
262 
268 
270 
281  { return this->EstimatedRenderTime; }
282  virtual double GetEstimatedRenderTime()
283  { return this->EstimatedRenderTime; }
285 
287 
291  virtual void SetEstimatedRenderTime(double t)
292  { this->EstimatedRenderTime = t; this->SavedEstimatedRenderTime = t; }
294 
296 
302  { this->EstimatedRenderTime = this->SavedEstimatedRenderTime; }
304 
305 
307 
317  virtual void AddEstimatedRenderTime(double t, vtkViewport *vtkNotUsed(vp))
318  { this->EstimatedRenderTime += t; }
320 
322 
329  virtual void SetAllocatedRenderTime(double t, vtkViewport *vtkNotUsed(v))
330  {
331  this->AllocatedRenderTime = t;
332  this->SavedEstimatedRenderTime = this->EstimatedRenderTime;
333  this->EstimatedRenderTime = 0.0;
334  }
336 
338 
340  vtkGetMacro(AllocatedRenderTime, double);
342 
344 
348  void SetRenderTimeMultiplier( double t )
349  { this->RenderTimeMultiplier = t; }
350  vtkGetMacro(RenderTimeMultiplier, double);
352 
356  virtual void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path);
357 
359 
363  virtual bool GetSupportsSelection()
364  { return false; }
366 
368 
369  vtkGetMacro(NumberOfConsumers,int);
371 
373 
374  void AddConsumer(vtkObject *c);
375  void RemoveConsumer(vtkObject *c);
376  vtkObject *GetConsumer(int i);
377  int IsConsumer(vtkObject *c);
379 
380 //ETX
381 
382 protected:
383  vtkProp();
384  ~vtkProp();
385 
387  int Pickable;
388  int Dragable;
389  bool UseBounds;
390 
395 
396  // how many consumers does this object have
399 
400  // support multi-part props and access to paths of prop
401  // stuff that follows is used to build the assembly hierarchy
403 
405 
406 private:
407  vtkProp(const vtkProp&); // Not implemented.
408  void operator=(const vtkProp&); // Not implemented.
409 };
410 
411 #endif
virtual void SetEstimatedRenderTime(double t)
Definition: vtkProp.h:291
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:49
virtual vtkMatrix4x4 * GetMatrix()
Definition: vtkProp.h:147
#define vtkNotUsed(x)
Definition: vtkSetGet.h:557
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:282
const GLdouble * v
Definition: vtkgl.h:11595
Store vtkAlgorithm input/output information.
double EstimatedRenderTime
Definition: vtkProp.h:392
abstract specification for Viewports
Definition: vtkViewport.h:46
virtual int RenderOpaqueGeometry(vtkViewport *)
Definition: vtkProp.h:195
virtual int HasTranslucentPolygonalGeometry()
Definition: vtkProp.h:259
int NumberOfConsumers
Definition: vtkProp.h:397
virtual int RenderOverlay(vtkViewport *)
Definition: vtkProp.h:201
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
virtual void SetAllocatedRenderTime(double t, vtkViewport *vtkNotUsed(v))
Definition: vtkProp.h:329
virtual bool GetSupportsSelection()
Definition: vtkProp.h:363
int Dragable
Definition: vtkProp.h:388
GLdouble GLdouble t
Definition: vtkgl.h:11602
virtual double GetEstimatedRenderTime(vtkViewport *)
Definition: vtkProp.h:280
double AllocatedRenderTime
Definition: vtkProp.h:391
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
virtual void AddEstimatedRenderTime(double t, vtkViewport *vtkNotUsed(vp))
Definition: vtkProp.h:317
GLuint GLenum matrix
Definition: vtkgl.h:16451
a list of Props
virtual void ReleaseGraphicsResources(vtkWindow *)
Definition: vtkProp.h:267
virtual double * GetBounds()
Definition: vtkProp.h:117
double SavedEstimatedRenderTime
Definition: vtkProp.h:393
window superclass for vtkRenderWindow
Definition: vtkWindow.h:33
virtual int RenderVolumetricGeometry(vtkViewport *)
Definition: vtkProp.h:199
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
const GLubyte * c
Definition: vtkgl.h:15720
Key for integer values in vtkInformation.
virtual void GetVolumes(vtkPropCollection *)
Definition: vtkProp.h:61
int Pickable
Definition: vtkProp.h:387
virtual unsigned long GetRedrawMTime()
Definition: vtkProp.h:100
a list of lists of props representing an assembly hierarchy
vtkAssemblyPaths * Paths
Definition: vtkProp.h:402
GLsizei const GLchar ** path
Definition: vtkgl.h:13835
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkObject ** Consumers
Definition: vtkProp.h:398
void SetRenderTimeMultiplier(double t)
Definition: vtkProp.h:348
virtual void GetActors2D(vtkPropCollection *)
Definition: vtkProp.h:60
#define VTKRENDERINGCORE_EXPORT
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
Definition: vtkProp.h:197
virtual void RestoreEstimatedRenderTime()
Definition: vtkProp.h:301
virtual void PokeMatrix(vtkMatrix4x4 *vtkNotUsed(matrix))
Definition: vtkProp.h:146
#define vtkBooleanMacro(name, type)
Definition: vtkSetGet.h:244
virtual int GetNumberOfPaths()
Definition: vtkProp.h:138
double RenderTimeMultiplier
Definition: vtkProp.h:394
int Visibility
Definition: vtkProp.h:386
vtkInformation * PropertyKeys
Definition: vtkProp.h:404
virtual void GetActors(vtkPropCollection *)
Definition: vtkProp.h:59
bool UseBounds
Definition: vtkProp.h:389
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:79