VTK
dox
Rendering
OpenGL2
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
#include <string>
// For string usage
33
34
class
vtkActor
;
35
class
vtkImageData
;
36
class
vtkMatrix4x4
;
37
class
vtkPath
;
38
class
vtkRenderer
;
39
class
vtkRenderWindow
;
40
class
vtkTextProperty
;
41
class
vtkTransformFeedback
;
42
43
class
VTKRENDERINGOPENGL2_EXPORT
vtkOpenGLGL2PSHelper
:
public
vtkObject
44
{
45
public
:
46
static
vtkOpenGLGL2PSHelper
*
New
();
47
vtkAbstractTypeMacro(
vtkOpenGLGL2PSHelper
,
vtkObject
)
48
void PrintSelf(ostream &os,
vtkIndent
indent) override;
49
51
54
static
vtkOpenGLGL2PSHelper
* GetInstance();
55
static
void
SetInstance(
vtkOpenGLGL2PSHelper
*);
57
59
62
vtkGetMacro(RenderWindow,
vtkRenderWindow
*)
64
65
enum
State
66
{
67
Inactive = 0,
68
Background
,
69
Capture
70
};
71
73
83
vtkGetMacro(ActiveState, State)
85
87
90
vtkSetMacro(PointSize,
float
)
91
vtkGetMacro(PointSize,
float
)
93
95
98
vtkSetMacro(LineWidth,
float
)
99
vtkGetMacro(LineWidth,
float
)
101
103
107
vtkSetMacro(LineStipple,
unsigned
short
)
108
vtkGetMacro(LineStipple,
unsigned
short
)
110
112
118
virtual
void
ProcessTransformFeedback(
vtkTransformFeedback
*tfc,
119
vtkRenderer
*ren,
vtkActor
*act) = 0;
120
virtual
void
ProcessTransformFeedback(
vtkTransformFeedback
*tfc,
121
vtkRenderer
*ren,
122
unsigned
char
col[4]) = 0;
123
virtual
void
ProcessTransformFeedback(
vtkTransformFeedback
*tfc,
124
vtkRenderer
*ren,
125
float
col[4]) = 0;
127
135
virtual
void
DrawString(
const
std::string
&str,
vtkTextProperty
*tprop,
136
double
pos[3],
double
backgroundDepth,
137
vtkRenderer
*ren) = 0;
138
150
virtual
void
DrawPath(
vtkPath
*path,
double
rasterPos[3],
double
windowPos[2],
151
unsigned
char
rgba[4],
double
scale
[2] =
nullptr
,
152
double
rotateAngle = 0.0,
float
strokeWidth = -1,
153
const
char
*label =
nullptr
) = 0;
154
160
virtual
void
Draw3DPath(
vtkPath
*path,
vtkMatrix4x4
*actorMatrix,
161
double
rasterPos[3],
unsigned
char
actorColor[4],
162
vtkRenderer
*ren,
const
char
*label =
nullptr
) = 0;
163
168
virtual
void
DrawImage(
vtkImageData
*
image
,
double
pos[3]) = 0;
169
170
protected
:
171
friend
class
vtkOpenGLGL2PSExporter
;
172
173
vtkOpenGLGL2PSHelper
();
174
~
vtkOpenGLGL2PSHelper
()
override
;
175
176
vtkSetMacro(ActiveState,
State
)
177
vtkSetMacro(
TextAsPath
,
bool
)
178
vtkSetMacro(
RenderWindow
,
vtkRenderWindow
*)
// Doesn't ref count, not needed.
179
vtkSetMacro(
PointSizeFactor
,
float
)
180
vtkSetMacro(
LineWidthFactor
,
float
)
181
182
static
vtkOpenGLGL2PSHelper
*Instance;
183
184
vtkRenderWindow
*
RenderWindow
;
185
State
ActiveState;
186
bool
TextAsPath
;
187
float
PointSize;
188
float
LineWidth;
189
float
PointSizeFactor
;
190
float
LineWidthFactor
;
191
unsigned
short
LineStipple;
192
193
private:
194
vtkOpenGLGL2PSHelper
(const
vtkOpenGLGL2PSHelper
&) = delete;
195
void
operator=(const
vtkOpenGLGL2PSHelper
&) = delete;
196
};
197
198
#endif // vtkOpenGLGL2PSHelper_h
vtkX3D::scale
Definition:
vtkX3D.h:229
vtkGL2PSExporter::PointSizeFactor
float PointSizeFactor
Definition:
vtkGL2PSExporter.h:379
vtkOpenGLGL2PSExporter
OpenGL2 implementation of GL2PS exporter.
Definition:
vtkOpenGLGL2PSExporter.h:32
vtkOpenGLGL2PSHelper::Background
No export active.
Definition:
vtkOpenGLGL2PSHelper.h:68
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkX3D::image
Definition:
vtkX3D.h:374
vtkPath
concrete dataset representing a path defined by Bezier curves.
Definition:
vtkPath.h:35
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:59
vtkOpenGLGL2PSHelper::State
State
Definition:
vtkOpenGLGL2PSHelper.h:65
vtkGL2PSExporter::TextAsPath
bool TextAsPath
Definition:
vtkGL2PSExporter.h:378
vtkGL2PSExporter::LineWidthFactor
float LineWidthFactor
Definition:
vtkGL2PSExporter.h:380
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition:
vtkActor.h:51
vtkImageData
topologically and geometrically regular array of data
Definition:
vtkImageData.h:45
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:39
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition:
vtkMatrix4x4.h:41
vtkObject.h
vtkTextProperty
represent text properties.
Definition:
vtkTextProperty.h:39
vtkX3D::string
Definition:
vtkX3D.h:490
vtkRenderer
abstract specification for renderers
Definition:
vtkRenderer.h:63
vtkOpenGLGL2PSHelper
Access GL2PS functionality.
Definition:
vtkOpenGLGL2PSHelper.h:43
vtkRenderWindow
create a window for renderers to draw into
Definition:
vtkRenderWindow.h:87
vtkExporter::RenderWindow
vtkRenderWindow * RenderWindow
Definition:
vtkExporter.h:127
vtkTransformFeedback
Manages a TransformFeedback buffer.
Definition:
vtkTransformFeedback.h:40
Generated by
1.8.16