VTK
vtkOpenGLGL2PSExporter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGL2PSExporter.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 =========================================================================*/
77 #ifndef vtkOpenGLGL2PSExporter_h
78 #define vtkOpenGLGL2PSExporter_h
79 
80 #include "vtkIOExportOpenGLModule.h" // For export macro
81 #include "vtkGL2PSExporter.h"
82 
83 #include "vtkNew.h" // For vtkNew
84 
85 class vtkActor;
86 class vtkActor2D;
88 class vtkCollection;
89 class vtkCoordinate;
90 class vtkImageData;
91 class vtkIntArray;
94 class vtkMatrix4x4;
95 class vtkPath;
96 class vtkProp;
97 class vtkPropCollection;
99 class vtkRenderer;
101 class vtkScalarBarActor;
102 class vtkTextActor;
103 class vtkTextActor3D;
104 class vtkTextMapper;
105 class vtkTextProperty;
106 
107 class VTKIOEXPORTOPENGL_EXPORT vtkOpenGLGL2PSExporter : public vtkGL2PSExporter
108 {
109 public:
110  static vtkOpenGLGL2PSExporter *New();
112  void PrintSelf(ostream& os, vtkIndent indent);
113 
114 protected:
116  ~vtkOpenGLGL2PSExporter();
117 
118  void WriteData();
119 
120  void SavePropVisibility(vtkRendererCollection *renCol,
121  vtkIntArray *volVis, vtkIntArray *actVis,
122  vtkIntArray *act2dVis);
123  void RestorePropVisibility(vtkRendererCollection *renCol,
124  vtkIntArray *volVis, vtkIntArray *actVis,
125  vtkIntArray *act2dVis);
126  void Turn3DPropsOff(vtkRendererCollection *renCol);
127  void Turn2DPropsOff(vtkRendererCollection *renCol);
128  void GetVisibleContextActors(vtkPropCollection *contextActors,
129  vtkRendererCollection *renCol);
130  void SetPropVisibilities(vtkPropCollection *col, int vis);
131 
132  void DrawSpecialProps(vtkCollection *propCol, vtkRendererCollection *renCol);
134 
138  virtual void HandleSpecialProp(vtkProp *prop, vtkRenderer *ren);
139  void DrawBillboardTextActor3D(vtkBillboardTextActor3D *textAct,
140  vtkRenderer *ren);
141  void DrawTextActor(vtkTextActor *textAct, vtkRenderer *ren);
142  void DrawTextActor3D(vtkTextActor3D *textAct, vtkRenderer *ren);
143  void DrawTextMapper(vtkTextMapper *textMap, vtkActor2D *textAct,
144  vtkRenderer *ren);
145  void DrawLabeledDataMapper(vtkLabeledDataMapper *mapper, vtkRenderer *ren);
146  void DrawLabeledContourMapper(vtkActor *act, vtkLabeledContourMapper *mapper,
147  vtkRenderer *ren);
148  void DrawScalarBarActor(vtkScalarBarActor *bar, vtkRenderer *ren);
149  void DrawViewportTextOverlay(const char *string, vtkTextProperty *tprop,
150  vtkCoordinate *coord, vtkRenderer *ren);
152 
157  void CopyPixels(int copyRect[4], vtkRenderer *ren);
158 
159  void DrawContextActors(vtkPropCollection *contextActs,
160  vtkRendererCollection *renCol);
161 
162  vtkNew<vtkImageData> PixelData;
163 
164 private:
165  vtkOpenGLGL2PSExporter(const vtkOpenGLGL2PSExporter&) VTK_DELETE_FUNCTION;
166  void operator=(const vtkOpenGLGL2PSExporter&) VTK_DELETE_FUNCTION;
167 };
168 
169 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:50
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:41
export a scene as a PostScript file using GL2PS.
concrete dataset representing a path defined by Bezier curves.
Definition: vtkPath.h:35
Renders pixel-aligned text, facing the camera, anchored at a 3D point.
a actor that draws 2D data
Definition: vtkActor2D.h:45
Create a scalar bar with labels.
abstract specification for renderers
Definition: vtkRenderer.h:63
Draw labeled isolines.
2D text annotation
Definition: vtkTextMapper.h:53
draw text labels at dataset points
a list of Props
An actor that displays text.
Definition: vtkTextActor.h:56
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:45
a list of renderers
a simple class to control print indentation
Definition: vtkIndent.h:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
An actor that displays text.
OpenGL2 implementation of GL2PS exporter.
a list of 3D props
represent text properties.
static vtkGL2PSExporter * New()
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems ...
Definition: vtkCoordinate.h:70
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:51
Allocate and hold a VTK object.
Definition: vtkNew.h:67