VTK  9.1.0
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 =========================================================================*/
71 #ifndef vtkRIBExporter_h
72 #define vtkRIBExporter_h
73 
74 #include "vtkExporter.h"
75 #include "vtkIOExportModule.h" // For export macro
76 
77 class vtkActor;
78 class vtkCamera;
79 class vtkLight;
80 class vtkPolyData;
81 class vtkProperty;
82 class vtkRenderer;
83 class vtkTexture;
85 
86 class VTKIOEXPORT_EXPORT vtkRIBExporter : public vtkExporter
87 {
88 public:
89  static vtkRIBExporter* New();
90  vtkTypeMacro(vtkRIBExporter, vtkExporter);
91  void PrintSelf(ostream& os, vtkIndent indent) override;
92 
94 
98  vtkSetVector2Macro(Size, int);
99  vtkGetVectorMacro(Size, int, 2);
101 
103 
106  vtkSetVector2Macro(PixelSamples, int);
107  vtkGetVectorMacro(PixelSamples, int, 2);
109 
111 
115  vtkSetFilePathMacro(FilePrefix);
116  vtkGetFilePathMacro(FilePrefix);
118 
120 
123  vtkSetStringMacro(TexturePrefix);
124  vtkGetStringMacro(TexturePrefix);
126 
128 
145  vtkSetMacro(Background, vtkTypeBool);
146  vtkGetMacro(Background, vtkTypeBool);
147  vtkBooleanMacro(Background, vtkTypeBool);
149 
151 
156  vtkSetClampMacro(ExportArrays, vtkTypeBool, 0, 1);
157  vtkBooleanMacro(ExportArrays, vtkTypeBool);
158  vtkGetMacro(ExportArrays, vtkTypeBool);
160 
161 protected:
163  ~vtkRIBExporter() override;
164 
166  int Size[2];
167  int PixelSamples[2];
168 
173 
175 
179  void WriteTrailer();
180  void WriteTexture(vtkTexture* aTexture);
181  void WriteViewport(vtkRenderer* aRenderer, int size[2]);
182  void WriteCamera(vtkCamera* aCamera);
183  void WriteLight(vtkLight* aLight, int count);
184  void WriteAmbientLight(int count);
185  void WriteProperty(vtkProperty* aProperty, vtkTexture* aTexture);
187  void WriteStrips(vtkPolyData* pd, vtkUnsignedCharArray* colors, vtkProperty* aProperty);
189 
190  void WriteData() override;
191  void WriteActor(vtkActor* anActor);
192 
199  void ModifyArrayName(char* newname, const char* name);
200 
201  char* GetTextureName(vtkTexture* aTexture);
202  char* GetTIFFName(vtkTexture* aTexture);
203  char* FilePrefix;
204  FILE* FilePtr;
206 
207 private:
208  vtkRIBExporter(const vtkRIBExporter&) = delete;
209  void operator=(const vtkRIBExporter&) = delete;
210 };
211 
212 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:155
a virtual camera for 3D rendering
Definition: vtkCamera.h:155
abstract class to write a scene to a file
Definition: vtkExporter.h:48
a simple class to control print indentation
Definition: vtkIndent.h:113
a virtual light for 3D rendering
Definition: vtkLight.h:166
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
represent surface properties of a geometric object
Definition: vtkProperty.h:171
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:173
handles properties associated with a texture map
Definition: vtkTexture.h:175
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