VTK
vtkOpenGLGL2PSHelper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenGLGL2PSHelper.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 
27 #ifndef vtkOpenGLGL2PSHelper_h
28 #define vtkOpenGLGL2PSHelper_h
29 
30 #include "vtkRenderingOpenGL2Module.h" // For export macro
31 #include "vtkObject.h"
32 
33 class vtkActor;
34 class vtkImageData;
35 class vtkMatrix4x4;
36 class vtkPath;
37 class vtkRenderer;
38 class vtkRenderWindow;
39 class vtkTextProperty;
41 
42 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLGL2PSHelper: public vtkObject
43 {
44 public:
45  static vtkOpenGLGL2PSHelper* New();
46  vtkAbstractTypeMacro(vtkOpenGLGL2PSHelper, vtkObject)
47  virtual void PrintSelf(ostream &os, vtkIndent indent);
48 
50 
53  static vtkOpenGLGL2PSHelper* GetInstance();
54  static void SetInstance(vtkOpenGLGL2PSHelper *);
56 
58 
61  vtkGetMacro(RenderWindow, vtkRenderWindow*)
63 
64  enum State
65  {
66  Inactive = 0,
68  Capture
69  };
70 
72 
82  vtkGetMacro(ActiveState, State)
84 
86 
89  vtkSetMacro(PointSize, float)
90  vtkGetMacro(PointSize, float)
92 
94 
97  vtkSetMacro(LineWidth, float)
98  vtkGetMacro(LineWidth, float)
100 
102 
106  vtkSetMacro(LineStipple, unsigned short)
107  vtkGetMacro(LineStipple, unsigned short)
109 
111 
117  virtual void ProcessTransformFeedback(vtkTransformFeedback *tfc,
118  vtkRenderer *ren, vtkActor *act) = 0;
119  virtual void ProcessTransformFeedback(vtkTransformFeedback *tfc,
120  vtkRenderer *ren,
121  unsigned char col[4]) = 0;
122  virtual void ProcessTransformFeedback(vtkTransformFeedback *tfc,
123  vtkRenderer *ren,
124  float col[4]) = 0;
126 
134  virtual void DrawString(const std::string &str, vtkTextProperty *tprop,
135  double pos[3], double backgroundDepth,
136  vtkRenderer *ren) = 0;
137 
149  virtual void DrawPath(vtkPath *path, double rasterPos[3], double windowPos[2],
150  unsigned char rgba[4], double scale[2] = NULL,
151  double rotateAngle = 0.0, float strokeWidth = -1,
152  const char *label = NULL) = 0;
153 
159  virtual void Draw3DPath(vtkPath *path, vtkMatrix4x4 *actorMatrix,
160  double rasterPos[3], unsigned char actorColor[4],
161  vtkRenderer *ren, const char *label = NULL) = 0;
162 
167  virtual void DrawImage(vtkImageData *image, double pos[3]) = 0;
168 
169 protected:
171 
174 
175  vtkSetMacro(ActiveState, State)
176  vtkSetMacro(TextAsPath, bool)
177  vtkSetMacro(RenderWindow, vtkRenderWindow*) // Doesn't ref count, not needed.
178  vtkSetMacro(PointSizeFactor, float)
179  vtkSetMacro(LineWidthFactor, float)
180 
181  static vtkOpenGLGL2PSHelper *Instance;
182 
183  vtkRenderWindow *RenderWindow;
184  State ActiveState;
185  bool TextAsPath;
186  float PointSize;
187  float LineWidth;
188  float PointSizeFactor;
189  float LineWidthFactor;
190  unsigned short LineStipple;
191 
192 private:
193  vtkOpenGLGL2PSHelper(const vtkOpenGLGL2PSHelper &) VTK_DELETE_FUNCTION;
194  void operator=(const vtkOpenGLGL2PSHelper &) VTK_DELETE_FUNCTION;
195 };
196 
197 #endif // vtkOpenGLGL2PSHelper_h
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
abstract base class for most VTK objects
Definition: vtkObject.h:59
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:41
concrete dataset representing a path defined by Bezier curves.
Definition: vtkPath.h:35
Helper functionality for GL2PS exporting.
abstract specification for renderers
Definition: vtkRenderer.h:63
a simple class to control print indentation
Definition: vtkIndent.h:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
Manages a TransformFeedback buffer.
OpenGL2 implementation of GL2PS exporter.
represent text properties.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkWeakPointer< vtkRenderWindow > RenderWindow
create a window for renderers to draw into
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...