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 =========================================================================*/
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;
46 
48 {
49 public:
50  vtkTypeMacro(vtkProp, vtkObject);
51  void PrintSelf(ostream& os, vtkIndent indent);
52 
54 
57  virtual void GetActors(vtkPropCollection *) {}
58  virtual void GetActors2D(vtkPropCollection *) {}
59  virtual void GetVolumes(vtkPropCollection *) {}
61 
63 
64  vtkSetMacro(Visibility, int);
65  vtkGetMacro(Visibility, int);
66  vtkBooleanMacro(Visibility, int);
68 
70 
73  vtkSetMacro(Pickable, int);
74  vtkGetMacro(Pickable, int);
75  vtkBooleanMacro(Pickable, int);
77 
79  virtual void Pick();
80 
82 
88  vtkSetMacro(Dragable, int);
89  vtkGetMacro(Dragable, int);
90  vtkBooleanMacro(Dragable, int);
92 
94 
98  virtual unsigned long GetRedrawMTime()
99  { return this->GetMTime(); }
101 
103 
107  vtkSetMacro(UseBounds, bool);
108  vtkGetMacro(UseBounds, bool);
109  vtkBooleanMacro(UseBounds, bool);
111 
113 
115  virtual double *GetBounds()
116  { return NULL; }
118 
120  virtual void ShallowCopy(vtkProp *prop);
121 
123 
134  virtual void InitPathTraversal();
135  virtual vtkAssemblyPath *GetNextPath();
136  virtual int GetNumberOfPaths()
137  { return 1; }
139 
141 
144  virtual void PokeMatrix(vtkMatrix4x4 *vtkNotUsed(matrix)) {}
146  { return NULL; }
148 
150 
154  vtkGetObjectMacro(PropertyKeys,vtkInformation);
155  virtual void SetPropertyKeys(vtkInformation *keys);
157 
160  virtual bool HasKeys(vtkInformation *requiredKeys);
161 
162 //BTX
164 
178  { return 0; }
180  { return 0; }
182  { return 0; }
183  virtual int RenderOverlay(vtkViewport *)
184  { return 0; }
186 
188 
194  virtual bool RenderFilteredOpaqueGeometry(vtkViewport *v,
195  vtkInformation *requiredKeys);
197 
199 
205  virtual bool RenderFilteredTranslucentPolygonalGeometry(
206  vtkViewport *v,
207  vtkInformation *requiredKeys);
209 
211 
217  virtual bool RenderFilteredVolumetricGeometry(vtkViewport *v,
218  vtkInformation *requiredKeys);
220 
222 
228  virtual bool RenderFilteredOverlay(vtkViewport *v,
229  vtkInformation *requiredKeys);
231 
233 
242  { return 0; }
244 
250 
252 
263  { return this->EstimatedRenderTime; }
264  virtual double GetEstimatedRenderTime()
265  { return this->EstimatedRenderTime; }
267 
269 
273  virtual void SetEstimatedRenderTime(double t)
274  { this->EstimatedRenderTime = t; this->SavedEstimatedRenderTime = t; }
276 
278 
284  { this->EstimatedRenderTime = this->SavedEstimatedRenderTime; }
286 
287 
289 
299  virtual void AddEstimatedRenderTime(double t, vtkViewport *vtkNotUsed(vp))
300  { this->EstimatedRenderTime += t; }
302 
304 
311  virtual void SetAllocatedRenderTime(double t, vtkViewport *vtkNotUsed(v))
312  {
313  this->AllocatedRenderTime = t;
314  this->SavedEstimatedRenderTime = this->EstimatedRenderTime;
315  this->EstimatedRenderTime = 0.0;
316  }
318 
320 
322  vtkGetMacro(AllocatedRenderTime, double);
324 
326 
330  void SetRenderTimeMultiplier( double t )
331  { this->RenderTimeMultiplier = t; }
332  vtkGetMacro(RenderTimeMultiplier, double);
334 
338  virtual void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path);
339 
341 
345  virtual bool GetSupportsSelection()
346  { return false; }
348 
350 
351  vtkGetMacro(NumberOfConsumers,int);
353 
355 
356  void AddConsumer(vtkObject *c);
357  void RemoveConsumer(vtkObject *c);
358  vtkObject *GetConsumer(int i);
359  int IsConsumer(vtkObject *c);
361 
362 //ETX
363 
364 protected:
365  vtkProp();
366  ~vtkProp();
367 
369  int Pickable;
370  int Dragable;
371  bool UseBounds;
372 
377 
378  // how many consumers does this object have
381 
382  // support multi-part props and access to paths of prop
383  // stuff that follows is used to build the assembly hierarchy
385 
387 
388 private:
389  vtkProp(const vtkProp&); // Not implemented.
390  void operator=(const vtkProp&); // Not implemented.
391 };
392 
393 #endif
virtual void SetEstimatedRenderTime(double t)
Definition: vtkProp.h:273
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:47
virtual vtkMatrix4x4 * GetMatrix()
Definition: vtkProp.h:145
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:264
const GLdouble * v
Definition: vtkgl.h:11595
Store vtkAlgorithm input/output information.
double EstimatedRenderTime
Definition: vtkProp.h:374
abstract specification for Viewports
Definition: vtkViewport.h:46
virtual int RenderOpaqueGeometry(vtkViewport *)
Definition: vtkProp.h:177
virtual int HasTranslucentPolygonalGeometry()
Definition: vtkProp.h:241
int NumberOfConsumers
Definition: vtkProp.h:379
virtual int RenderOverlay(vtkViewport *)
Definition: vtkProp.h:183
virtual void SetAllocatedRenderTime(double t, vtkViewport *vtkNotUsed(v))
Definition: vtkProp.h:311
virtual bool GetSupportsSelection()
Definition: vtkProp.h:345
int Dragable
Definition: vtkProp.h:370
GLdouble GLdouble t
Definition: vtkgl.h:11602
virtual double GetEstimatedRenderTime(vtkViewport *)
Definition: vtkProp.h:262
double AllocatedRenderTime
Definition: vtkProp.h:373
virtual void AddEstimatedRenderTime(double t, vtkViewport *vtkNotUsed(vp))
Definition: vtkProp.h:299
GLuint GLenum matrix
Definition: vtkgl.h:16451
a list of Props
virtual void ReleaseGraphicsResources(vtkWindow *)
Definition: vtkProp.h:249
virtual double * GetBounds()
Definition: vtkProp.h:115
double SavedEstimatedRenderTime
Definition: vtkProp.h:375
window superclass for vtkRenderWindow
Definition: vtkWindow.h:33
virtual int RenderVolumetricGeometry(vtkViewport *)
Definition: vtkProp.h:181
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:59
int Pickable
Definition: vtkProp.h:369
virtual unsigned long GetRedrawMTime()
Definition: vtkProp.h:98
a list of lists of props representing an assembly hierarchy
vtkAssemblyPaths * Paths
Definition: vtkProp.h:384
GLsizei const GLchar ** path
Definition: vtkgl.h:13835
vtkObject ** Consumers
Definition: vtkProp.h:380
void SetRenderTimeMultiplier(double t)
Definition: vtkProp.h:330
virtual void GetActors2D(vtkPropCollection *)
Definition: vtkProp.h:58
#define VTKRENDERINGCORE_EXPORT
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
Definition: vtkProp.h:179
virtual void RestoreEstimatedRenderTime()
Definition: vtkProp.h:283
virtual void PokeMatrix(vtkMatrix4x4 *vtkNotUsed(matrix))
Definition: vtkProp.h:144
virtual int GetNumberOfPaths()
Definition: vtkProp.h:136
double RenderTimeMultiplier
Definition: vtkProp.h:376
int Visibility
Definition: vtkProp.h:368
vtkInformation * PropertyKeys
Definition: vtkProp.h:386
virtual void GetActors(vtkPropCollection *)
Definition: vtkProp.h:57
bool UseBounds
Definition: vtkProp.h:371