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
33class vtkActor;
34class vtkImageData;
35class vtkMatrix4x4;
36class vtkPath;
37class vtkRenderer;
38class vtkRenderWindow;
39class vtkTextProperty;
41
42class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLGL2PSHelper: public vtkObject
43{
44public:
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
169protected:
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
192private:
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:52
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
a simple class to control print indentation
Definition: vtkIndent.h:40
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:42
abstract base class for most VTK objects
Definition: vtkObject.h:60
OpenGL2 implementation of GL2PS exporter.
Helper functionality for GL2PS exporting.
@ Background
No export active.
static vtkOpenGLGL2PSHelper * New()
vtkAbstractTypeMacro(vtkOpenGLGL2PSHelper, vtkObject) virtual void PrintSelf(ostream &os
concrete dataset representing a path defined by Bezier curves.
Definition: vtkPath.h:36
create a window for renderers to draw into
abstract specification for renderers
Definition: vtkRenderer.h:64
represent text properties.
Manages a TransformFeedback buffer.
@ scale
Definition: vtkX3D.h:229
@ image
Definition: vtkX3D.h:374
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.