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=========================================================================*/
51#ifndef vtkRIBExporter_h
52#define vtkRIBExporter_h
53
54#include "vtkExporter.h"
55#include "vtkIOExportModule.h" // For export macro
56
57class vtkActor;
58class vtkCamera;
59class vtkLight;
60class vtkPolyData;
61class vtkProperty;
62class vtkRenderer;
63class vtkTexture;
65
66class VTKIOEXPORT_EXPORT vtkRIBExporter : public vtkExporter
67{
68public:
71 void PrintSelf(ostream& os, vtkIndent indent) override;
72
74
78 vtkSetVector2Macro(Size, int);
79 vtkGetVectorMacro(Size, int, 2);
81
83
86 vtkSetVector2Macro(PixelSamples, int);
87 vtkGetVectorMacro(PixelSamples, int, 2);
89
91
98
100
103 vtkSetStringMacro(TexturePrefix);
104 vtkGetStringMacro(TexturePrefix);
106
108
125 vtkSetMacro(Background, vtkTypeBool);
126 vtkGetMacro(Background, vtkTypeBool);
127 vtkBooleanMacro(Background, vtkTypeBool);
129
131
136 vtkSetClampMacro(ExportArrays, vtkTypeBool, 0, 1);
137 vtkBooleanMacro(ExportArrays, vtkTypeBool);
138 vtkGetMacro(ExportArrays, vtkTypeBool);
140
141protected:
143 ~vtkRIBExporter() override;
144
146 int Size[2];
147 int PixelSamples[2];
148
153
155
160 void WriteTexture(vtkTexture* aTexture);
161 void WriteViewport(vtkRenderer* aRenderer, int size[2]);
162 void WriteCamera(vtkCamera* aCamera);
163 void WriteLight(vtkLight* aLight, int count);
164 void WriteAmbientLight(int count);
165 void WriteProperty(vtkProperty* aProperty, vtkTexture* aTexture);
169
170 void WriteData() override;
171 void WriteActor(vtkActor* anActor);
172
179 void ModifyArrayName(char* newname, const char* name);
180
181 char* GetTextureName(vtkTexture* aTexture);
182 char* GetTIFFName(vtkTexture* aTexture);
184 FILE* FilePtr;
186
187private:
188 vtkRIBExporter(const vtkRIBExporter&) = delete;
189 void operator=(const vtkRIBExporter&) = delete;
190};
191
192#endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:55
a virtual camera for 3D rendering
Definition: vtkCamera.h:55
abstract class to write a scene to a file
Definition: vtkExporter.h:48
a simple class to control print indentation
Definition: vtkIndent.h:43
a virtual light for 3D rendering
Definition: vtkLight.h:66
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:95
represent surface properties of a geometric object
Definition: vtkProperty.h:71
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
Definition: vtkRenderer.h:73
handles properties associated with a texture map
Definition: vtkTexture.h:75
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