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 
37 class vtkAssemblyPath;
38 class vtkAssemblyPaths;
39 class vtkMatrix4x4;
40 class vtkPropCollection;
41 class vtkViewport;
42 class vtkWindow;
43 class vtkInformation;
46 
47 class VTKRENDERINGCORE_EXPORT vtkProp : public vtkObject
48 {
49 public:
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; }
225  virtual int RenderOverlay(vtkViewport *)
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 
428 protected:
431 
433  int Pickable;
434  int Dragable;
435  bool UseBounds;
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 
452 private:
453  vtkProp(const vtkProp&) VTK_DELETE_FUNCTION;
454  void operator=(const vtkProp&) VTK_DELETE_FUNCTION;
455 };
456 
457 #endif
vtkProp::vtkProp
vtkProp()
vtkProp::EstimatedRenderTime
double EstimatedRenderTime
Definition: vtkProp.h:438
vtkProp::UseBounds
bool UseBounds
Definition: vtkProp.h:435
vtkProp::GetMatrix
virtual vtkMatrix4x4 * GetMatrix()
Definition: vtkProp.h:160
vtkProp::PokeMatrix
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
vtkProp::Paths
vtkAssemblyPaths * Paths
Definition: vtkProp.h:448
vtkProp::InitPathTraversal
virtual void InitPathTraversal()
vtkProp and its subclasses can be picked by subclasses of vtkAbstractPicker (e.g.,...
vtkProp::GetActors2D
virtual void GetActors2D(vtkPropCollection *)
Definition: vtkProp.h:59
vtkProp::GetNextPath
virtual vtkAssemblyPath * GetNextPath()
vtkProp::RenderOverlay
virtual int RenderOverlay(vtkViewport *)
Definition: vtkProp.h:225
vtkProp::GetSupportsSelection
virtual bool GetSupportsSelection()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
Definition: vtkProp.h:408
vtkProp::IsConsumer
int IsConsumer(vtkObject *c)
vtkProp::Pick
virtual void Pick()
Method fires PickEvent if the prop is picked.
vtkProp::RenderOpaqueGeometry
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
vtkProp::GetEstimatedRenderTime
virtual double GetEstimatedRenderTime()
Definition: vtkProp.h:316
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:60
vtkProp::Pickable
int Pickable
Definition: vtkProp.h:433
vtkProp::PropertyKeys
vtkInformation * PropertyKeys
Definition: vtkProp.h:450
vtkProp::NumberOfConsumers
int NumberOfConsumers
Definition: vtkProp.h:443
vtkAssemblyPath
a list of nodes that form an assembly path
Definition: vtkAssemblyPath.h:42
vtkAssemblyPaths
a list of lists of props representing an assembly hierarchy
Definition: vtkAssemblyPaths.h:38
vtkProp::SetAllocatedRenderTime
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
vtkProp::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkProp::GetVolumes
virtual void GetVolumes(vtkPropCollection *)
Definition: vtkProp.h:60
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
vtkMTimeType
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
vtkProp::RenderFilteredOpaqueGeometry
virtual bool RenderFilteredOpaqueGeometry(vtkViewport *v, vtkInformation *requiredKeys)
Render the opaque geometry only if the prop has all the requiredKeys.
vtkProp::RenderVolumetricGeometry
virtual int RenderVolumetricGeometry(vtkViewport *)
Definition: vtkProp.h:223
vtkProp::Consumers
vtkObject ** Consumers
Definition: vtkProp.h:444
vtkProp::BuildPaths
virtual void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
vtkProp::~vtkProp
~vtkProp()
vtkProp::GetActors
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
vtkProp::RenderFilteredTranslucentPolygonalGeometry
virtual bool RenderFilteredTranslucentPolygonalGeometry(vtkViewport *v, vtkInformation *requiredKeys)
Render the translucent polygonal geometry only if the prop has all the requiredKeys.
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkProp::GetConsumer
vtkObject * GetConsumer(int i)
vtkInformationIntegerKey
Key for integer values in vtkInformation.
Definition: vtkInformationIntegerKey.h:35
vtkProp::SavedEstimatedRenderTime
double SavedEstimatedRenderTime
Definition: vtkProp.h:439
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:42
vtkProp::SetPropertyKeys
virtual void SetPropertyKeys(vtkInformation *keys)
vtkProp::AllocatedRenderTime
double AllocatedRenderTime
Definition: vtkProp.h:437
vtkProp::GetNumberOfPaths
virtual int GetNumberOfPaths()
Definition: vtkProp.h:150
vtkProp::Visibility
int Visibility
Definition: vtkProp.h:432
vtkProp::SetRenderTimeMultiplier
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
vtkProp::GetBounds
virtual double * GetBounds()
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
Definition: vtkProp.h:127
vtkProp::RenderFilteredVolumetricGeometry
virtual bool RenderFilteredVolumetricGeometry(vtkViewport *v, vtkInformation *requiredKeys)
Render the volumetric geometry only if the prop has all the requiredKeys.
vtkProp::ShallowCopy
virtual void ShallowCopy(vtkProp *prop)
Shallow copy of this vtkProp.
vtkProp::GetEstimatedRenderTime
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
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:48
vtkObject.h
vtkProp::RenderTranslucentPolygonalGeometry
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
Definition: vtkProp.h:221
vtkProp::GeneralTextureTransform
static vtkInformationDoubleVectorKey * GeneralTextureTransform()
Optional Key Indicating the texture transform for general texture mapping Old OpenGL was a state mach...
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:48
vtkProp::AddEstimatedRenderTime
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
vtkProp::RenderFilteredOverlay
virtual bool RenderFilteredOverlay(vtkViewport *v, vtkInformation *requiredKeys)
Render in the overlay of the viewport only if the prop has all the requiredKeys.
vtkInformationDoubleVectorKey
Key for double vector values.
Definition: vtkInformationDoubleVectorKey.h:35
vtkProp::RemoveConsumer
void RemoveConsumer(vtkObject *c)
vtkProp::RestoreEstimatedRenderTime
virtual void RestoreEstimatedRenderTime()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:337
vtkProp::Dragable
int Dragable
Definition: vtkProp.h:434
vtkProp::HasKeys
virtual bool HasKeys(vtkInformation *requiredKeys)
Tells if the prop has all the required keys.
vtkProp::SetEstimatedRenderTime
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
vtkPropCollection
a list of Props
Definition: vtkPropCollection.h:39
vtkProp::AddConsumer
void AddConsumer(vtkObject *c)
Add or remove or get or check a consumer,.
vtkProp::GetRedrawMTime
virtual vtkMTimeType GetRedrawMTime()
Return the mtime of anything that would cause the rendered image to appear differently.
Definition: vtkProp.h:108
vtkProp::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkProp.h:300
vtkProp::HasTranslucentPolygonalGeometry
virtual int HasTranslucentPolygonalGeometry()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:291
vtkProp::RenderTimeMultiplier
double RenderTimeMultiplier
Definition: vtkProp.h:440
vtkProp::GeneralTextureUnit
static vtkInformationIntegerKey * GeneralTextureUnit()
Optional Key Indicating the texture unit for general texture mapping Old OpenGL was a state machine w...