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 
165 
169  int vtkNotUsed(fieldassociation)) { return idIn; }
171 
178  static vtkInformationIntegerKey *GeneralTextureUnit();
179 
186  static vtkInformationDoubleVectorKey *GeneralTextureTransform();
187 
188 //BTX
190 
204  { return 0; }
206  { return 0; }
208  { return 0; }
209  virtual int RenderOverlay(vtkViewport *)
210  { return 0; }
212 
214 
220  virtual bool RenderFilteredOpaqueGeometry(vtkViewport *v,
221  vtkInformation *requiredKeys);
223 
225 
231  virtual bool RenderFilteredTranslucentPolygonalGeometry(
232  vtkViewport *v,
233  vtkInformation *requiredKeys);
235 
237 
243  virtual bool RenderFilteredVolumetricGeometry(vtkViewport *v,
244  vtkInformation *requiredKeys);
246 
248 
254  virtual bool RenderFilteredOverlay(vtkViewport *v,
255  vtkInformation *requiredKeys);
257 
259 
268  { return 0; }
270 
276 
278 
289  { return this->EstimatedRenderTime; }
290  virtual double GetEstimatedRenderTime()
291  { return this->EstimatedRenderTime; }
293 
295 
299  virtual void SetEstimatedRenderTime(double t)
300  { this->EstimatedRenderTime = t; this->SavedEstimatedRenderTime = t; }
302 
304 
310  { this->EstimatedRenderTime = this->SavedEstimatedRenderTime; }
312 
313 
315 
325  virtual void AddEstimatedRenderTime(double t, vtkViewport *vtkNotUsed(vp))
326  { this->EstimatedRenderTime += t; }
328 
330 
337  virtual void SetAllocatedRenderTime(double t, vtkViewport *vtkNotUsed(v))
338  {
339  this->AllocatedRenderTime = t;
340  this->SavedEstimatedRenderTime = this->EstimatedRenderTime;
341  this->EstimatedRenderTime = 0.0;
342  }
344 
346 
348  vtkGetMacro(AllocatedRenderTime, double);
350 
352 
356  void SetRenderTimeMultiplier( double t )
357  { this->RenderTimeMultiplier = t; }
358  vtkGetMacro(RenderTimeMultiplier, double);
360 
364  virtual void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path);
365 
367 
371  virtual bool GetSupportsSelection()
372  { return false; }
374 
376 
377  vtkGetMacro(NumberOfConsumers,int);
379 
381 
382  void AddConsumer(vtkObject *c);
383  void RemoveConsumer(vtkObject *c);
384  vtkObject *GetConsumer(int i);
385  int IsConsumer(vtkObject *c);
387 
388 //ETX
389 
390 protected:
391  vtkProp();
392  ~vtkProp();
393 
395  int Pickable;
396  int Dragable;
397  bool UseBounds;
398 
403 
404  // how many consumers does this object have
407 
408  // support multi-part props and access to paths of prop
409  // stuff that follows is used to build the assembly hierarchy
411 
413 
414 private:
415  vtkProp(const vtkProp&); // Not implemented.
416  void operator=(const vtkProp&); // Not implemented.
417 };
418 
419 #endif
virtual void SetEstimatedRenderTime(double t)
Definition: vtkProp.h:299
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: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:290
const GLdouble * v
Definition: vtkgl.h:11595
Store vtkAlgorithm input/output information.
double EstimatedRenderTime
Definition: vtkProp.h:400
abstract specification for Viewports
Definition: vtkViewport.h:46
virtual int RenderOpaqueGeometry(vtkViewport *)
Definition: vtkProp.h:203
virtual int HasTranslucentPolygonalGeometry()
Definition: vtkProp.h:267
int NumberOfConsumers
Definition: vtkProp.h:405
virtual int RenderOverlay(vtkViewport *)
Definition: vtkProp.h:209
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:83
virtual void SetAllocatedRenderTime(double t, vtkViewport *vtkNotUsed(v))
Definition: vtkProp.h:337
virtual bool GetSupportsSelection()
Definition: vtkProp.h:371
int Dragable
Definition: vtkProp.h:396
int vtkIdType
Definition: vtkType.h:281
GLdouble GLdouble t
Definition: vtkgl.h:11602
virtual double GetEstimatedRenderTime(vtkViewport *)
Definition: vtkProp.h:288
double AllocatedRenderTime
Definition: vtkProp.h:399
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:632
virtual void AddEstimatedRenderTime(double t, vtkViewport *vtkNotUsed(vp))
Definition: vtkProp.h:325
GLuint GLenum matrix
Definition: vtkgl.h:16451
a list of Props
virtual void ReleaseGraphicsResources(vtkWindow *)
Definition: vtkProp.h:275
virtual double * GetBounds()
Definition: vtkProp.h:117
double SavedEstimatedRenderTime
Definition: vtkProp.h:401
window superclass for vtkRenderWindow
Definition: vtkWindow.h:33
virtual int RenderVolumetricGeometry(vtkViewport *)
Definition: vtkProp.h:207
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:395
virtual unsigned long GetRedrawMTime()
Definition: vtkProp.h:100
a list of lists of props representing an assembly hierarchy
vtkAssemblyPaths * Paths
Definition: vtkProp.h:410
GLsizei const GLchar ** path
Definition: vtkgl.h:13835
virtual vtkIdType GetConvertedPickValue(vtkIdType idIn, int vtkNotUsed(fieldassociation))
Definition: vtkProp.h:168
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:222
vtkObject ** Consumers
Definition: vtkProp.h:406
void SetRenderTimeMultiplier(double t)
Definition: vtkProp.h:356
virtual void GetActors2D(vtkPropCollection *)
Definition: vtkProp.h:60
#define VTKRENDERINGCORE_EXPORT
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
Definition: vtkProp.h:205
virtual void RestoreEstimatedRenderTime()
Definition: vtkProp.h:309
virtual void PokeMatrix(vtkMatrix4x4 *vtkNotUsed(matrix))
Definition: vtkProp.h:146
#define vtkBooleanMacro(name, type)
Definition: vtkSetGet.h:234
virtual int GetNumberOfPaths()
Definition: vtkProp.h:138
double RenderTimeMultiplier
Definition: vtkProp.h:402
int Visibility
Definition: vtkProp.h:394
vtkInformation * PropertyKeys
Definition: vtkProp.h:412
virtual void GetActors(vtkPropCollection *)
Definition: vtkProp.h:59
bool UseBounds
Definition: vtkProp.h:397
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:69