VTK  9.3.0
vtkRIBExporter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
33 #ifndef vtkRIBExporter_h
34 #define vtkRIBExporter_h
35 
36 #include "vtkExporter.h"
37 #include "vtkIOExportModule.h" // For export macro
38 
39 VTK_ABI_NAMESPACE_BEGIN
40 class vtkActor;
41 class vtkCamera;
42 class vtkLight;
43 class vtkPolyData;
44 class vtkProperty;
45 class vtkRenderer;
46 class vtkTexture;
48 
49 class VTKIOEXPORT_EXPORT vtkRIBExporter : public vtkExporter
50 {
51 public:
52  static vtkRIBExporter* New();
53  vtkTypeMacro(vtkRIBExporter, vtkExporter);
54  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
57 
61  vtkSetVector2Macro(Size, int);
62  vtkGetVectorMacro(Size, int, 2);
64 
66 
69  vtkSetVector2Macro(PixelSamples, int);
70  vtkGetVectorMacro(PixelSamples, int, 2);
72 
74 
78  vtkSetFilePathMacro(FilePrefix);
79  vtkGetFilePathMacro(FilePrefix);
81 
83 
86  vtkSetStringMacro(TexturePrefix);
87  vtkGetStringMacro(TexturePrefix);
89 
91 
108  vtkSetMacro(Background, vtkTypeBool);
109  vtkGetMacro(Background, vtkTypeBool);
110  vtkBooleanMacro(Background, vtkTypeBool);
112 
114 
119  vtkSetClampMacro(ExportArrays, vtkTypeBool, 0, 1);
120  vtkBooleanMacro(ExportArrays, vtkTypeBool);
121  vtkGetMacro(ExportArrays, vtkTypeBool);
123 
124 protected:
126  ~vtkRIBExporter() override;
127 
129  int Size[2];
130  int PixelSamples[2];
131 
136 
138 
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);
150  void WriteStrips(vtkPolyData* pd, vtkUnsignedCharArray* colors, vtkProperty* aProperty);
152 
153  void WriteData() override;
154  void WriteActor(vtkActor* anActor);
155 
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 
170 private:
171  vtkRIBExporter(const vtkRIBExporter&) = delete;
172  void operator=(const vtkRIBExporter&) = delete;
173 };
174 
175 VTK_ABI_NAMESPACE_END
176 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:41
a virtual camera for 3D rendering
Definition: vtkCamera.h:41
abstract class to write a scene to a file
Definition: vtkExporter.h:37
a simple class to control print indentation
Definition: vtkIndent.h:29
a virtual light for 3D rendering
Definition: vtkLight.h:49
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:80
represent surface properties of a geometric object
Definition: vtkProperty.h:57
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:62
handles properties associated with a texture map
Definition: vtkTexture.h:58
dynamic, self-adjusting array of unsigned char
@ Background
Definition: vtkX3D.h:71
@ name
Definition: vtkX3D.h:219
@ size
Definition: vtkX3D.h:253
int vtkTypeBool
Definition: vtkABI.h:64