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=========================================================================*/
31#ifndef vtkProp_h
32#define vtkProp_h
33
34#include "vtkRenderingCoreModule.h" // For export macro
35#include "vtkObject.h"
36
37class vtkAssemblyPath;
39class vtkMatrix4x4;
41class vtkViewport;
42class vtkWindow;
43class vtkInformation;
46
47class VTKRENDERINGCORE_EXPORT vtkProp : public vtkObject
48{
49public:
50 vtkTypeMacro(vtkProp, vtkObject);
51 void PrintSelf(ostream& os, vtkIndent indent);
52
58 virtual void GetActors(vtkPropCollection *) {}
59 virtual void GetActors2D(vtkPropCollection *) {}
60 virtual void GetVolumes(vtkPropCollection *) {}
61
63
66 vtkSetMacro(Visibility, int);
67 vtkGetMacro(Visibility, int);
68 vtkBooleanMacro(Visibility, int);
70
72
77 vtkSetMacro(Pickable, int);
78 vtkGetMacro(Pickable, int);
79 vtkBooleanMacro(Pickable, int);
81
85 virtual void Pick();
86
88
97 vtkSetMacro(Dragable, int);
98 vtkGetMacro(Dragable, int);
99 vtkBooleanMacro(Dragable, int);
101
109 { return this->GetMTime(); }
110
112
118 vtkSetMacro(UseBounds, bool);
119 vtkGetMacro(UseBounds, bool);
120 vtkBooleanMacro(UseBounds, bool);
122
127 virtual double *GetBounds()
128 { return NULL; }
129
133 virtual void ShallowCopy(vtkProp *prop);
134
136
148 virtual void InitPathTraversal();
150 virtual int GetNumberOfPaths()
151 { return 1; }
153
159 virtual void PokeMatrix(vtkMatrix4x4 *vtkNotUsed(matrix)) {}
161 { return NULL; }
162
164
171 vtkGetObjectMacro(PropertyKeys,vtkInformation);
172 virtual void SetPropertyKeys(vtkInformation *keys);
174
179 virtual bool HasKeys(vtkInformation *requiredKeys);
180
191
202
220 { return 0; }
222 { return 0; }
224 { return 0; }
226 { return 0; }
227
238 vtkInformation *requiredKeys);
239
251 vtkViewport *v,
252 vtkInformation *requiredKeys);
253
265 vtkInformation *requiredKeys);
266
278 vtkInformation *requiredKeys);
279
292 { return 0; }
293
301
315 { return this->EstimatedRenderTime; }
316 virtual double GetEstimatedRenderTime()
317 { return this->EstimatedRenderTime; }
318
326 virtual void SetEstimatedRenderTime(double t)
327 { this->EstimatedRenderTime = t; this->SavedEstimatedRenderTime = t; }
328
338 { this->EstimatedRenderTime = this->SavedEstimatedRenderTime; }
339
340
354 virtual void AddEstimatedRenderTime(double t, vtkViewport *vtkNotUsed(vp))
355 { this->EstimatedRenderTime += t; }
356
358
368 virtual void SetAllocatedRenderTime(double t, vtkViewport *vtkNotUsed(v))
369 {
370 this->AllocatedRenderTime = t;
371 this->SavedEstimatedRenderTime = this->EstimatedRenderTime;
372 this->EstimatedRenderTime = 0.0;
373 }
375
377
381 vtkGetMacro(AllocatedRenderTime, double);
383
391 void SetRenderTimeMultiplier( double t )
392 { this->RenderTimeMultiplier = t; }
393 vtkGetMacro(RenderTimeMultiplier, double);
394
400 virtual void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path);
401
408 virtual bool GetSupportsSelection()
409 { return false; }
410
412
415 vtkGetMacro(NumberOfConsumers,int);
417
419
427
428protected:
431
436
441
442 // how many consumers does this object have
445
446 // support multi-part props and access to paths of prop
447 // stuff that follows is used to build the assembly hierarchy
449
451
452private:
453 vtkProp(const vtkProp&) VTK_DELETE_FUNCTION;
454 void operator=(const vtkProp&) VTK_DELETE_FUNCTION;
455};
456
457#endif
a list of nodes that form an assembly path
a list of lists of props representing an assembly hierarchy
a simple class to control print indentation
Definition: vtkIndent.h:40
Key for integer values in vtkInformation.
Store vtkAlgorithm input/output information.
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:42
abstract base class for most VTK objects
Definition: vtkObject.h:60
virtual vtkMTimeType GetMTime()
Return this object's modified time.
a list of Props
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:48
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:159
static vtkInformationDoubleVectorKey * GeneralTextureTransform()
Optional Key Indicating the texture transform for general texture mapping Old OpenGL was a state mach...
virtual void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
virtual bool RenderFilteredTranslucentPolygonalGeometry(vtkViewport *v, vtkInformation *requiredKeys)
Render the translucent polygonal geometry only if the prop has all the requiredKeys.
virtual double GetEstimatedRenderTime()
Definition: vtkProp.h:316
virtual bool RenderFilteredOverlay(vtkViewport *v, vtkInformation *requiredKeys)
Render in the overlay of the viewport only if the prop has all the requiredKeys.
vtkObject ** Consumers
Definition: vtkProp.h:444
virtual bool RenderFilteredVolumetricGeometry(vtkViewport *v, vtkInformation *requiredKeys)
Render the volumetric geometry only if the prop has all the requiredKeys.
vtkAssemblyPaths * Paths
Definition: vtkProp.h:448
void SetRenderTimeMultiplier(double t)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
Definition: vtkProp.h:391
virtual int GetNumberOfPaths()
Definition: vtkProp.h:150
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:326
virtual int RenderOpaqueGeometry(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:219
virtual void Pick()
Method fires PickEvent if the prop is picked.
vtkInformation * PropertyKeys
Definition: vtkProp.h:450
bool UseBounds
Definition: vtkProp.h:435
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:354
virtual bool GetSupportsSelection()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
Definition: vtkProp.h:408
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual vtkAssemblyPath * GetNextPath()
virtual int HasTranslucentPolygonalGeometry()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:291
int Pickable
Definition: vtkProp.h:433
int NumberOfConsumers
Definition: vtkProp.h:443
void RemoveConsumer(vtkObject *c)
int Dragable
Definition: vtkProp.h:434
double SavedEstimatedRenderTime
Definition: vtkProp.h:439
virtual void InitPathTraversal()
vtkProp and its subclasses can be picked by subclasses of vtkAbstractPicker (e.g.,...
vtkObject * GetConsumer(int i)
int IsConsumer(vtkObject *c)
static vtkInformationIntegerKey * GeneralTextureUnit()
Optional Key Indicating the texture unit for general texture mapping Old OpenGL was a state machine w...
double EstimatedRenderTime
Definition: vtkProp.h:438
virtual int RenderVolumetricGeometry(vtkViewport *)
Definition: vtkProp.h:223
virtual vtkMatrix4x4 * GetMatrix()
Definition: vtkProp.h:160
virtual double * GetBounds()
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
Definition: vtkProp.h:127
void AddConsumer(vtkObject *c)
Add or remove or get or check a consumer,.
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
Definition: vtkProp.h:221
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:368
virtual void SetPropertyKeys(vtkInformation *keys)
virtual bool RenderFilteredOpaqueGeometry(vtkViewport *v, vtkInformation *requiredKeys)
Render the opaque geometry only if the prop has all the requiredKeys.
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:58
int Visibility
Definition: vtkProp.h:432
virtual int RenderOverlay(vtkViewport *)
Definition: vtkProp.h:225
virtual bool HasKeys(vtkInformation *requiredKeys)
Tells if the prop has all the required keys.
virtual void GetVolumes(vtkPropCollection *)
Definition: vtkProp.h:60
double RenderTimeMultiplier
Definition: vtkProp.h:440
virtual vtkMTimeType GetRedrawMTime()
Return the mtime of anything that would cause the rendered image to appear differently.
Definition: vtkProp.h:108
virtual double GetEstimatedRenderTime(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:314
double AllocatedRenderTime
Definition: vtkProp.h:437
virtual void ShallowCopy(vtkProp *prop)
Shallow copy of this vtkProp.
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkProp.h:300
virtual void RestoreEstimatedRenderTime()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:337
virtual void GetActors2D(vtkPropCollection *)
Definition: vtkProp.h:59
abstract specification for Viewports
Definition: vtkViewport.h:48
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248