VTK  9.2.6
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 =========================================================================*/
74 #ifndef vtkRIBExporter_h
75 #define vtkRIBExporter_h
76 
77 #include "vtkExporter.h"
78 #include "vtkIOExportModule.h" // For export macro
79 
80 class vtkActor;
81 class vtkCamera;
82 class vtkLight;
83 class vtkPolyData;
84 class vtkProperty;
85 class vtkRenderer;
86 class vtkTexture;
88 
89 class VTKIOEXPORT_EXPORT vtkRIBExporter : public vtkExporter
90 {
91 public:
92  static vtkRIBExporter* New();
93  vtkTypeMacro(vtkRIBExporter, vtkExporter);
94  void PrintSelf(ostream& os, vtkIndent indent) override;
95 
97 
101  vtkSetVector2Macro(Size, int);
102  vtkGetVectorMacro(Size, int, 2);
104 
106 
109  vtkSetVector2Macro(PixelSamples, int);
110  vtkGetVectorMacro(PixelSamples, int, 2);
112 
114 
118  vtkSetFilePathMacro(FilePrefix);
119  vtkGetFilePathMacro(FilePrefix);
121 
123 
126  vtkSetStringMacro(TexturePrefix);
127  vtkGetStringMacro(TexturePrefix);
129 
131 
148  vtkSetMacro(Background, vtkTypeBool);
149  vtkGetMacro(Background, vtkTypeBool);
150  vtkBooleanMacro(Background, vtkTypeBool);
152 
154 
159  vtkSetClampMacro(ExportArrays, vtkTypeBool, 0, 1);
160  vtkBooleanMacro(ExportArrays, vtkTypeBool);
161  vtkGetMacro(ExportArrays, vtkTypeBool);
163 
164 protected:
166  ~vtkRIBExporter() override;
167 
169  int Size[2];
170  int PixelSamples[2];
171 
176 
178 
182  void WriteTrailer();
183  void WriteTexture(vtkTexture* aTexture);
184  void WriteViewport(vtkRenderer* aRenderer, int size[2]);
185  void WriteCamera(vtkCamera* aCamera);
186  void WriteLight(vtkLight* aLight, int count);
187  void WriteAmbientLight(int count);
188  void WriteProperty(vtkProperty* aProperty, vtkTexture* aTexture);
190  void WriteStrips(vtkPolyData* pd, vtkUnsignedCharArray* colors, vtkProperty* aProperty);
192 
193  void WriteData() override;
194  void WriteActor(vtkActor* anActor);
195 
202  void ModifyArrayName(char* newname, const char* name);
203 
204  char* GetTextureName(vtkTexture* aTexture);
205  char* GetTIFFName(vtkTexture* aTexture);
206  char* FilePrefix;
207  FILE* FilePtr;
209 
210 private:
211  vtkRIBExporter(const vtkRIBExporter&) = delete;
212  void operator=(const vtkRIBExporter&) = delete;
213 };
214 
215 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:161
a virtual camera for 3D rendering
Definition: vtkCamera.h:161
abstract class to write a scene to a file
Definition: vtkExporter.h:48
a simple class to control print indentation
Definition: vtkIndent.h:119
a virtual light for 3D rendering
Definition: vtkLight.h:169
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:200
represent surface properties of a geometric object
Definition: vtkProperty.h:177
export a scene into RenderMan RIB format.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void WriteLight(vtkLight *aLight, int count)
Write the RIB header.
void WriteTexture(vtkTexture *aTexture)
Write the RIB header.
void WriteProperty(vtkProperty *aProperty, vtkTexture *aTexture)
Write the RIB header.
static vtkRIBExporter * New()
void WriteActor(vtkActor *anActor)
char * GetTextureName(vtkTexture *aTexture)
void WriteCamera(vtkCamera *aCamera)
Write the RIB header.
~vtkRIBExporter() override
vtkTypeBool ExportArrays
This variable defines whether the arrays are exported or not.
vtkSetFilePathMacro(FilePrefix)
Specify the prefix of the files to write out.
void WriteData() override
char * GetTIFFName(vtkTexture *aTexture)
vtkTypeBool Background
void WriteStrips(vtkPolyData *pd, vtkUnsignedCharArray *colors, vtkProperty *aProperty)
Write the RIB header.
vtkGetFilePathMacro(FilePrefix)
Specify the prefix of the files to write out.
void WriteViewport(vtkRenderer *aRenderer, int size[2])
Write the RIB header.
void WriteTrailer()
Write the RIB header.
void WriteAmbientLight(int count)
Write the RIB header.
void WriteHeader(vtkRenderer *aRen)
Write the RIB header.
void ModifyArrayName(char *newname, const char *name)
Since additional variables are sent to the shader as variables, and their names are used in the shade...
void WritePolygons(vtkPolyData *pd, vtkUnsignedCharArray *colors, vtkProperty *aProperty)
Write the RIB header.
abstract specification for renderers
Definition: vtkRenderer.h:182
handles properties associated with a texture map
Definition: vtkTexture.h:178
dynamic, self-adjusting array of unsigned char
@ Background
Definition: vtkX3D.h:77
@ name
Definition: vtkX3D.h:225
@ size
Definition: vtkX3D.h:259
int vtkTypeBool
Definition: vtkABI.h:69