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 =========================================================================*/
54 #ifndef vtkRIBExporter_h
55 #define vtkRIBExporter_h
56 
57 #include "vtkExporter.h"
58 #include "vtkIOExportModule.h" // For export macro
59 
60 class vtkActor;
61 class vtkCamera;
62 class vtkLight;
63 class vtkPolyData;
64 class vtkProperty;
65 class vtkRenderer;
66 class vtkTexture;
68 
69 class VTKIOEXPORT_EXPORT vtkRIBExporter : public vtkExporter
70 {
71 public:
72  static vtkRIBExporter* New();
73  vtkTypeMacro(vtkRIBExporter, vtkExporter);
74  void PrintSelf(ostream& os, vtkIndent indent) override;
75 
77 
81  vtkSetVector2Macro(Size, int);
82  vtkGetVectorMacro(Size, int, 2);
84 
86 
89  vtkSetVector2Macro(PixelSamples, int);
90  vtkGetVectorMacro(PixelSamples, int, 2);
92 
94 
98  vtkSetFilePathMacro(FilePrefix);
99  vtkGetFilePathMacro(FilePrefix);
101 
103 
106  vtkSetStringMacro(TexturePrefix);
107  vtkGetStringMacro(TexturePrefix);
109 
111 
128  vtkSetMacro(Background, vtkTypeBool);
129  vtkGetMacro(Background, vtkTypeBool);
130  vtkBooleanMacro(Background, vtkTypeBool);
132 
134 
139  vtkSetClampMacro(ExportArrays, vtkTypeBool, 0, 1);
140  vtkBooleanMacro(ExportArrays, vtkTypeBool);
141  vtkGetMacro(ExportArrays, vtkTypeBool);
143 
144 protected:
146  ~vtkRIBExporter() override;
147 
149  int Size[2];
150  int PixelSamples[2];
151 
156 
158 
162  void WriteTrailer();
163  void WriteTexture(vtkTexture* aTexture);
164  void WriteViewport(vtkRenderer* aRenderer, int size[2]);
165  void WriteCamera(vtkCamera* aCamera);
166  void WriteLight(vtkLight* aLight, int count);
167  void WriteAmbientLight(int count);
168  void WriteProperty(vtkProperty* aProperty, vtkTexture* aTexture);
170  void WriteStrips(vtkPolyData* pd, vtkUnsignedCharArray* colors, vtkProperty* aProperty);
172 
173  void WriteData() override;
174  void WriteActor(vtkActor* anActor);
175 
182  void ModifyArrayName(char* newname, const char* name);
183 
184  char* GetTextureName(vtkTexture* aTexture);
185  char* GetTIFFName(vtkTexture* aTexture);
186  char* FilePrefix;
187  FILE* FilePtr;
189 
190 private:
191  vtkRIBExporter(const vtkRIBExporter&) = delete;
192  void operator=(const vtkRIBExporter&) = delete;
193 };
194 
195 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:61
a virtual camera for 3D rendering
Definition: vtkCamera.h:61
abstract class to write a scene to a file
Definition: vtkExporter.h:48
a simple class to control print indentation
Definition: vtkIndent.h:49
a virtual light for 3D rendering
Definition: vtkLight.h:69
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:100
represent surface properties of a geometric object
Definition: vtkProperty.h:77
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:82
handles properties associated with a texture map
Definition: vtkTexture.h:78
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