VTK
vtkRIBExporter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkRIBExporter.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 =========================================================================*/
51 #ifndef __vtkRIBExporter_h
52 #define __vtkRIBExporter_h
53 
54 #include "vtkIOExportModule.h" // For export macro
55 #include "vtkExporter.h"
56 
57 class vtkActor;
58 class vtkCamera;
59 class vtkLight;
60 class vtkPolyData;
61 class vtkProperty;
62 class vtkRenderer;
63 class vtkTexture;
65 
66 class VTKIOEXPORT_EXPORT vtkRIBExporter : public vtkExporter
67 {
68 public:
69  static vtkRIBExporter *New();
70  vtkTypeMacro(vtkRIBExporter,vtkExporter);
71  void PrintSelf(ostream& os, vtkIndent indent);
72 
74 
76  vtkSetVector2Macro(Size,int);
77  vtkGetVectorMacro(Size,int,2);
79 
81 
82  vtkSetVector2Macro(PixelSamples,int);
83  vtkGetVectorMacro(PixelSamples,int,2);
85 
87 
89  vtkSetStringMacro(FilePrefix);
90  vtkGetStringMacro(FilePrefix);
92 
94 
95  vtkSetStringMacro(TexturePrefix);
96  vtkGetStringMacro(TexturePrefix);
98 
100 
114  vtkSetMacro(Background,int);
115  vtkGetMacro(Background,int);
116  vtkBooleanMacro(Background,int);
118 
120 
123  vtkSetClampMacro(ExportArrays, int, 0, 1);
124  vtkBooleanMacro(ExportArrays, int);
125  vtkGetMacro(ExportArrays, int);
127 
128 protected:
129  vtkRIBExporter();
130  ~vtkRIBExporter();
131 
133  int Size[2];
134  int PixelSamples[2];
135 
138 
140 
141  void WriteHeader (vtkRenderer *aRen);
142  void WriteTrailer ();
143  void WriteTexture (vtkTexture *aTexture);
144  void WriteViewport (vtkRenderer *aRenderer, int size[2]);
145  void WriteCamera (vtkCamera *aCamera);
146  void WriteLight (vtkLight *aLight, int count);
147  void WriteAmbientLight (int count);
148  void WriteProperty (vtkProperty *aProperty, vtkTexture *aTexture);
149  void WritePolygons (vtkPolyData *pd, vtkUnsignedCharArray *colors,
150  vtkProperty *aProperty);
151  void WriteStrips (vtkPolyData *pd, vtkUnsignedCharArray *colors,
152  vtkProperty *aProperty);
154 
155  void WriteData();
156  void WriteActor(vtkActor *anActor);
157 
162  void ModifyArrayName(char *newname, const char* name);
163 
164  char *GetTextureName (vtkTexture *aTexture);
165  char *GetTIFFName (vtkTexture *aTexture);
166  char *FilePrefix;
167  FILE *FilePtr;
169 private:
170  vtkRIBExporter(const vtkRIBExporter&); // Not implemented.
171  void operator=(const vtkRIBExporter&); // Not implemented.
172 };
173 
174 #endif
175