VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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;
49 
51 {
52 public:
54  void PrintSelf(ostream& os, vtkIndent indent);
55 
57 
60  virtual void GetActors(vtkPropCollection *) {}
61  virtual void GetActors2D(vtkPropCollection *) {}
62  virtual void GetVolumes(vtkPropCollection *) {}
64 
66 
67  vtkSetMacro(Visibility, int);
68  vtkGetMacro(Visibility, int);
69  vtkBooleanMacro(Visibility, int);
71 
73 
76  vtkSetMacro(Pickable, int);
77  vtkGetMacro(Pickable, int);
78  vtkBooleanMacro(Pickable, int);
80 
82  virtual void Pick();
83 
85 
91  vtkSetMacro(Dragable, int);
92  vtkGetMacro(Dragable, int);
93  vtkBooleanMacro(Dragable, int);
95 
97 
101  virtual unsigned long GetRedrawMTime()
102  { return this->GetMTime(); }
104 
106 
110  vtkSetMacro(UseBounds, bool);
111  vtkGetMacro(UseBounds, bool);
112  vtkBooleanMacro(UseBounds, bool);
114 
116 
118  virtual double *GetBounds()
119  { return NULL; }
121 
123  virtual void ShallowCopy(vtkProp *prop);
124 
126 
137  virtual void InitPathTraversal();
138  virtual vtkAssemblyPath *GetNextPath();
139  virtual int GetNumberOfPaths()
140  { return 1; }
142 
144 
149  { return NULL; }
151 
153 
157  vtkGetObjectMacro(PropertyKeys,vtkInformation);
158  virtual void SetPropertyKeys(vtkInformation *keys);
160 
163  virtual bool HasKeys(vtkInformation *requiredKeys);
164 
165 //BTX
167 
181  { return 0; }
183  { return 0; }
185  { return 0; }
186  virtual int RenderOverlay(vtkViewport *)
187  { return 0; }
189 
191 
197  virtual bool RenderFilteredOpaqueGeometry(vtkViewport *v,
198  vtkInformation *requiredKeys);
200 
202 
208  virtual bool RenderFilteredTranslucentPolygonalGeometry(
209  vtkViewport *v,
210  vtkInformation *requiredKeys);
212 
214 
220  virtual bool RenderFilteredVolumetricGeometry(vtkViewport *v,
221  vtkInformation *requiredKeys);
223 
225 
231  virtual bool RenderFilteredOverlay(vtkViewport *v,
232  vtkInformation *requiredKeys);
234 
236 
245  { return 0; }
247 
253 
255 
266  { return this->EstimatedRenderTime; }
267  virtual double GetEstimatedRenderTime()
268  { return this->EstimatedRenderTime; }
270 
272 
276  virtual void SetEstimatedRenderTime(double t)
277  { this->EstimatedRenderTime = t; this->SavedEstimatedRenderTime = t; }
279 
281 
287  { this->EstimatedRenderTime = this->SavedEstimatedRenderTime; }
289 
290 
292 
302  virtual void AddEstimatedRenderTime(double t, vtkViewport *vtkNotUsed(vp))
303  { this->EstimatedRenderTime += t; }
305 
307 
314  virtual void SetAllocatedRenderTime(double t, vtkViewport *vtkNotUsed(v))
315  {
316  this->AllocatedRenderTime = t;
317  this->SavedEstimatedRenderTime = this->EstimatedRenderTime;
318  this->EstimatedRenderTime = 0.0;
319  }
321 
323 
325  vtkGetMacro(AllocatedRenderTime, double);
327 
329 
333  void SetRenderTimeMultiplier( double t )
334  { this->RenderTimeMultiplier = t; }
335  vtkGetMacro(RenderTimeMultiplier, double);
337 
341  virtual void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path);
342 
344 
348  virtual bool GetSupportsSelection()
349  { return false; }
351 
353 
354  vtkGetMacro(NumberOfConsumers,int);
356 
358 
359  void AddConsumer(vtkObject *c);
360  void RemoveConsumer(vtkObject *c);
361  vtkObject *GetConsumer(int i);
362  int IsConsumer(vtkObject *c);
364 
365 //ETX
366 
367 protected:
368  vtkProp();
369  ~vtkProp();
370 
372  int Pickable;
373  int Dragable;
374  bool UseBounds;
375 
380 
381  // how many consumers does this object have
384 
385  // support multi-part props and access to paths of prop
386  // stuff that follows is used to build the assembly hierarchy
388 
390 
391 private:
392  vtkProp(const vtkProp&); // Not implemented.
393  void operator=(const vtkProp&); // Not implemented.
394 };
395 
396 #endif
virtual void SetEstimatedRenderTime(double t)
Definition: vtkProp.h:276
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:50
virtual vtkMatrix4x4 * GetMatrix()
Definition: vtkProp.h:148
#define vtkNotUsed(x)
Definition: vtkSetGet.h:547
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:267
const GLdouble * v
Definition: vtkgl.h:11595
Store vtkAlgorithm input/output information.
double EstimatedRenderTime
Definition: vtkProp.h:377
abstract specification for Viewports
Definition: vtkViewport.h:46
virtual int RenderOpaqueGeometry(vtkViewport *)
Definition: vtkProp.h:180
virtual int HasTranslucentPolygonalGeometry()
Definition: vtkProp.h:244
int NumberOfConsumers
Definition: vtkProp.h:382
virtual int RenderOverlay(vtkViewport *)
Definition: vtkProp.h:186
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:83
virtual void SetAllocatedRenderTime(double t, vtkViewport *vtkNotUsed(v))
Definition: vtkProp.h:314
virtual bool GetSupportsSelection()
Definition: vtkProp.h:348
int Dragable
Definition: vtkProp.h:373
GLdouble GLdouble t
Definition: vtkgl.h:11602
virtual double GetEstimatedRenderTime(vtkViewport *)
Definition: vtkProp.h:265
double AllocatedRenderTime
Definition: vtkProp.h:376
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:619
virtual void AddEstimatedRenderTime(double t, vtkViewport *vtkNotUsed(vp))
Definition: vtkProp.h:302
GLuint GLenum matrix
Definition: vtkgl.h:16451
a list of Props
virtual void ReleaseGraphicsResources(vtkWindow *)
Definition: vtkProp.h:252
virtual double * GetBounds()
Definition: vtkProp.h:118
double SavedEstimatedRenderTime
Definition: vtkProp.h:378
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
virtual int RenderVolumetricGeometry(vtkViewport *)
Definition: vtkProp.h:184
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
virtual void GetVolumes(vtkPropCollection *)
Definition: vtkProp.h:62
int Pickable
Definition: vtkProp.h:372
virtual unsigned long GetRedrawMTime()
Definition: vtkProp.h:101
a list of lists of props representing an assembly hierarchy
vtkAssemblyPaths * Paths
Definition: vtkProp.h:387
GLsizei const GLchar ** path
Definition: vtkgl.h:13835
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:222
vtkObject ** Consumers
Definition: vtkProp.h:383
void SetRenderTimeMultiplier(double t)
Definition: vtkProp.h:333
virtual void GetActors2D(vtkPropCollection *)
Definition: vtkProp.h:61
#define VTKRENDERINGCORE_EXPORT
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
Definition: vtkProp.h:182
virtual void RestoreEstimatedRenderTime()
Definition: vtkProp.h:286
virtual void PokeMatrix(vtkMatrix4x4 *vtkNotUsed(matrix))
Definition: vtkProp.h:147
#define vtkBooleanMacro(name, type)
Definition: vtkSetGet.h:234
virtual int GetNumberOfPaths()
Definition: vtkProp.h:139
double RenderTimeMultiplier
Definition: vtkProp.h:379
int Visibility
Definition: vtkProp.h:371
vtkInformation * PropertyKeys
Definition: vtkProp.h:389
virtual void GetActors(vtkPropCollection *)
Definition: vtkProp.h:60
bool UseBounds
Definition: vtkProp.h:374
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:69