VTK
vtkOpenGLPropItem.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenGLPropItem.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 vtkOpenGLPropItem_h
27 #define vtkOpenGLPropItem_h
28 
29 #include "vtkRenderingContextOpenGLModule.h" // For export macro
30 #include "vtkPropItem.h"
31 #include "vtkNew.h" // for vtkNew
32 
33 class vtkCamera;
34 
35 class VTKRENDERINGCONTEXTOPENGL_EXPORT vtkOpenGLPropItem: public vtkPropItem
36 {
37 public:
38  static vtkOpenGLPropItem *New();
40 
41 protected:
43  ~vtkOpenGLPropItem();
44 
45  // Sync the active vtkCamera with the GL state set by the painter.
46  virtual void UpdateTransforms();
47 
48  // Restore the vtkCamera state.
49  virtual void ResetTransforms();
50 
51 private:
52  vtkNew<vtkCamera> CameraCache;
53 
54  vtkOpenGLPropItem(const vtkOpenGLPropItem &); // Not implemented.
55  void operator=(const vtkOpenGLPropItem &); // Not implemented.
56 };
57 
58 #endif //vtkOpenGLPropItem_h
Sync Context2D state with vtk camera.
Embed a vtkProp in a vtkContextScene.
Definition: vtkPropItem.h:36
static vtkPropItem * New()
a virtual camera for 3D rendering
Definition: vtkCamera.h:49
Allocate and hold a VTK object.
Definition: vtkNew.h:66