VTK
vtkPropItem.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPropItem.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 =========================================================================*/
15 
26 #ifndef vtkPropItem_h
27 #define vtkPropItem_h
28 
29 #include "vtkRenderingContext2DModule.h" // For export macro
30 #include "vtkAbstractContextItem.h"
31 
32 class vtkProp;
33 
34 class VTKRENDERINGCONTEXT2D_EXPORT vtkPropItem: public vtkAbstractContextItem
35 {
36 public:
37  static vtkPropItem *New();
39  void PrintSelf(ostream &os, vtkIndent indent) override;
40 
41  bool Paint(vtkContext2D *painter) override;
42  void ReleaseGraphicsResources() override;
43 
47  virtual void SetPropObject(vtkProp *PropObject);
48  vtkGetObjectMacro(PropObject, vtkProp)
49 
50 protected:
51  vtkPropItem();
52  ~vtkPropItem() override;
53 
54  // Sync the active vtkCamera with the GL state set by the painter.
55  virtual void UpdateTransforms();
56 
57  // Restore the vtkCamera state.
58  virtual void ResetTransforms();
59 
60 private:
61  vtkProp *PropObject;
62 
63  vtkPropItem(const vtkPropItem &) = delete;
64  void operator=(const vtkPropItem &) = delete;
65 };
66 
67 #endif //vtkPropItem_h
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:44
Embed a vtkProp in a vtkContextScene.
Definition: vtkPropItem.h:34
virtual bool Paint(vtkContext2D *painter)
Paint event for the item, called whenever the item needs to be drawn.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:52
a simple class to control print indentation
Definition: vtkIndent.h:33
base class for items that are part of a vtkContextScene.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
virtual void ReleaseGraphicsResources()
Release graphics resources hold by the item.