VTK  9.4.20241219
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
52#ifndef vtkRIBExporter_h
53#define vtkRIBExporter_h
54
55#include "vtkExporter.h"
56#include "vtkIOExportModule.h" // For export macro
57
58VTK_ABI_NAMESPACE_BEGIN
59class vtkActor;
60class vtkCamera;
61class vtkLight;
62class vtkPolyData;
63class vtkProperty;
64class vtkRenderer;
65class vtkTexture;
67
68class VTKIOEXPORT_EXPORT vtkRIBExporter : public vtkExporter
69{
70public:
73 void PrintSelf(ostream& os, vtkIndent indent) override;
74
76
80 vtkSetVector2Macro(Size, int);
81 vtkGetVectorMacro(Size, int, 2);
83
85
88 vtkSetVector2Macro(PixelSamples, int);
89 vtkGetVectorMacro(PixelSamples, int, 2);
91
93
100
102
105 vtkSetStringMacro(TexturePrefix);
106 vtkGetStringMacro(TexturePrefix);
108
110
127 vtkSetMacro(Background, vtkTypeBool);
128 vtkGetMacro(Background, vtkTypeBool);
129 vtkBooleanMacro(Background, vtkTypeBool);
131
133
138 vtkSetClampMacro(ExportArrays, vtkTypeBool, 0, 1);
139 vtkBooleanMacro(ExportArrays, vtkTypeBool);
140 vtkGetMacro(ExportArrays, vtkTypeBool);
142
143protected:
145 ~vtkRIBExporter() override;
146
148 int Size[2];
149 int PixelSamples[2];
150
155
157
162 void WriteTexture(vtkTexture* aTexture);
163 void WriteViewport(vtkRenderer* aRenderer, int size[2]);
164 void WriteCamera(vtkCamera* aCamera);
165 void WriteLight(vtkLight* aLight, int count);
166 void WriteAmbientLight(int count);
167 void WriteProperty(vtkProperty* aProperty, vtkTexture* aTexture);
171
172 void WriteData() override;
173 void WriteActor(vtkActor* anActor);
174
181 void ModifyArrayName(char* newname, const char* name);
182
183 char* GetTextureName(vtkTexture* aTexture);
184 char* GetTIFFName(vtkTexture* aTexture);
186 FILE* FilePtr;
188
189private:
190 vtkRIBExporter(const vtkRIBExporter&) = delete;
191 void operator=(const vtkRIBExporter&) = delete;
192};
193
194VTK_ABI_NAMESPACE_END
195#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:151
a virtual camera for 3D rendering
Definition vtkCamera.h:151
abstract class to write a scene to a file
Definition vtkExporter.h:37
a simple class to control print indentation
Definition vtkIndent.h:108
a virtual light for 3D rendering
Definition vtkLight.h:159
concrete dataset represents vertices, lines, polygons, and triangle strips
represent surface properties of a geometric object
export a scene into RenderMan RIB format.
char * GetTIFFName(vtkTexture *aTexture)
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.
void WriteActor(vtkActor *anActor)
static vtkRIBExporter * New()
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.
char * GetTextureName(vtkTexture *aTexture)
void WriteData() override
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
handles properties associated with a texture map
Definition vtkTexture.h:168
dynamic, self-adjusting array of unsigned char
int vtkTypeBool
Definition vtkABI.h:64