VTK
vtkOpenGLGL2PSHelperImpl.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkOpenGLGL2PSHelperImpl.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
22#ifndef vtkOpenGLGL2PSHelperImpl_h
23#define vtkOpenGLGL2PSHelperImpl_h
24
25#include "vtkRenderingGL2PSOpenGL2Module.h" // For export macro
26#include "vtkOpenGLGL2PSHelper.h"
27
28class vtkMatrix4x4;
29class vtkPoints;
30
31class VTKRENDERINGGL2PSOPENGL2_EXPORT vtkOpenGLGL2PSHelperImpl
33{
34public:
37 virtual void PrintSelf(ostream &os, vtkIndent indent);
38
39 virtual void ProcessTransformFeedback(vtkTransformFeedback *tfc,
40 vtkRenderer *ren, vtkActor *act);
41 virtual void ProcessTransformFeedback(vtkTransformFeedback *tfc,
42 vtkRenderer *ren,
43 unsigned char col[4]);
44 virtual void ProcessTransformFeedback(vtkTransformFeedback *tfc,
45 vtkRenderer *ren,
46 float col[4]);
47
48 virtual void DrawString(const std::string &str, vtkTextProperty *tprop,
49 double pos[3], double backgroundDepth,
50 vtkRenderer *ren);
51
52 virtual void DrawPath(vtkPath *path, double rasterPos[3], double windowPos[2],
53 unsigned char rgba[4], double scale[2] = NULL,
54 double rotateAngle = 0.0, float strokeWidth = -1,
55 const char *label = NULL);
56
57 virtual void Draw3DPath(vtkPath *path, vtkMatrix4x4 *actorMatrix,
58 double rasterPos[3], unsigned char actorColor[4],
59 vtkRenderer *ren, const char *label = NULL);
60
61 virtual void DrawImage(vtkImageData *image, double pos[3]);
62
63protected:
66
70 static const char* TextPropertyToPSFontName(vtkTextProperty *tprop);
71
75 static int TextPropertyToGL2PSAlignment(vtkTextProperty *tprop);
76
81 static void GetTransformParameters(vtkRenderer *ren,
82 vtkMatrix4x4 *actorMatrix,
83 vtkMatrix4x4 *xform, double vpOrigin[2],
84 double halfSize[2], double zfact[2]);
85
87
90 static void ProjectPoint(double point[3], vtkRenderer *ren,
91 vtkMatrix4x4 *actorMatrix = NULL);
92 static void ProjectPoint(double point[4], vtkMatrix4x4 *transformMatrix,
93 double viewportOrigin[2], double halfWidth,
94 double halfHeight, double zfact1, double zfact2);
95 static void ProjectPoints(vtkPoints *points, vtkRenderer *ren,
96 vtkMatrix4x4 *actorMatrix = NULL);
98
100
104 static void UnprojectPoint(double point[4], vtkMatrix4x4 *invTransformMatrix,
105 double viewportOrigin[2], double halfWidth,
106 double halfHeight, double zfact1, double zfact2);
107 static void UnprojectPoints(double *points3D, vtkIdType numPoints,
108 vtkRenderer *ren,
109 vtkMatrix4x4 *actorMatrix = NULL);
111
112 void DrawPathPS(vtkPath *path, double rasterPos[3], double windowPos[2],
113 unsigned char rgba[4], double scale[2], double rotateAngle,
114 float strokeWidth, const std::string &label);
115 void DrawPathPDF(vtkPath *path, double rasterPos[3], double windowPos[2],
116 unsigned char rgba[4], double scale[2], double rotateAngle,
117 float strokeWidth, const std::string &label);
118 void DrawPathSVG(vtkPath *path, double rasterPos[3], double windowPos[2],
119 unsigned char rgba[4], double scale[2], double rotateAngle,
120 float strokeWidth, const std::string &label);
121
122private:
123 vtkOpenGLGL2PSHelperImpl(const vtkOpenGLGL2PSHelperImpl &) VTK_DELETE_FUNCTION;
124 void operator=(const vtkOpenGLGL2PSHelperImpl &) VTK_DELETE_FUNCTION;
125};
126
127#endif // vtkOpenGLGL2PSHelperImpl_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
vtkOpenGLGL2PSHelper override implementation.
static vtkOpenGLGL2PSHelperImpl * New()
Helper functionality for GL2PS exporting.
concrete dataset representing a path defined by Bezier curves.
Definition: vtkPath.h:36
represent and manipulate 3D points
Definition: vtkPoints.h:40
abstract specification for renderers
Definition: vtkRenderer.h:64
represent text properties.
Manages a TransformFeedback buffer.
@ point
Definition: vtkX3D.h:236
@ points
Definition: vtkX3D.h:446
@ scale
Definition: vtkX3D.h:229
@ image
Definition: vtkX3D.h:374
int vtkIdType
Definition: vtkType.h:287