VTK
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 =========================================================================*/
52 #ifndef vtkRIBExporter_h
53 #define vtkRIBExporter_h
54 
55 #include "vtkIOExportModule.h" // For export macro
56 #include "vtkExporter.h"
57 
58 class vtkActor;
59 class vtkCamera;
60 class vtkLight;
61 class vtkPolyData;
62 class vtkProperty;
63 class vtkRenderer;
64 class vtkTexture;
66 
67 class VTKIOEXPORT_EXPORT vtkRIBExporter : public vtkExporter
68 {
69 public:
70  static vtkRIBExporter *New();
71  vtkTypeMacro(vtkRIBExporter,vtkExporter);
72  void PrintSelf(ostream& os, vtkIndent indent);
73 
75 
79  vtkSetVector2Macro(Size,int);
80  vtkGetVectorMacro(Size,int,2);
82 
84 
87  vtkSetVector2Macro(PixelSamples,int);
88  vtkGetVectorMacro(PixelSamples,int,2);
90 
92 
96  vtkSetStringMacro(FilePrefix);
97  vtkGetStringMacro(FilePrefix);
99 
101 
104  vtkSetStringMacro(TexturePrefix);
105  vtkGetStringMacro(TexturePrefix);
107 
109 
127  vtkGetMacro(Background,int);
130 
132 
137  vtkSetClampMacro(ExportArrays, int, 0, 1);
138  vtkBooleanMacro(ExportArrays, int);
139  vtkGetMacro(ExportArrays, int);
141 
142 protected:
145 
147  int Size[2];
148  int PixelSamples[2];
149 
154 
156 
159  void WriteHeader (vtkRenderer *aRen);
160  void WriteTrailer ();
161  void WriteTexture (vtkTexture *aTexture);
162  void WriteViewport (vtkRenderer *aRenderer, int size[2]);
163  void WriteCamera (vtkCamera *aCamera);
164  void WriteLight (vtkLight *aLight, int count);
165  void WriteAmbientLight (int count);
166  void WriteProperty (vtkProperty *aProperty, vtkTexture *aTexture);
168  vtkProperty *aProperty);
170  vtkProperty *aProperty);
172 
173  void WriteData();
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 private:
190  vtkRIBExporter(const vtkRIBExporter&) VTK_DELETE_FUNCTION;
191  void operator=(const vtkRIBExporter&) VTK_DELETE_FUNCTION;
192 };
193 
194 #endif
195 
vtkLight
a virtual light for 3D rendering
Definition: vtkLight.h:62
vtkRIBExporter::WriteCamera
void WriteCamera(vtkCamera *aCamera)
vtkRIBExporter::FilePrefix
char * FilePrefix
Definition: vtkRIBExporter.h:186
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:42
vtkRIBExporter::WriteViewport
void WriteViewport(vtkRenderer *aRenderer, int size[2])
vtkRIBExporter
export a scene into RenderMan RIB format.
Definition: vtkRIBExporter.h:68
vtkTexture
handles properties associated with a texture map
Definition: vtkTexture.h:71
vtkRIBExporter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkX3D::Background
@ Background
Definition: vtkX3D.h:71
vtkRIBExporter::TexturePrefix
char * TexturePrefix
Definition: vtkRIBExporter.h:188
vtkRIBExporter::GetTextureName
char * GetTextureName(vtkTexture *aTexture)
vtkRIBExporter::Background
int Background
Definition: vtkRIBExporter.h:146
vtkRIBExporter::vtkRIBExporter
vtkRIBExporter()
vtkRIBExporter::FilePtr
FILE * FilePtr
Definition: vtkRIBExporter.h:187
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:52
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkCamera
a virtual camera for 3D rendering
Definition: vtkCamera.h:51
vtkRIBExporter::WritePolygons
void WritePolygons(vtkPolyData *pd, vtkUnsignedCharArray *colors, vtkProperty *aProperty)
vtkRIBExporter::GetTIFFName
char * GetTIFFName(vtkTexture *aTexture)
vtkX3D::size
@ size
Definition: vtkX3D.h:253
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkRIBExporter::WriteActor
void WriteActor(vtkActor *anActor)
vtkX3D::name
@ name
Definition: vtkX3D.h:219
vtkRIBExporter::ExportArrays
int ExportArrays
This variable defines whether the arrays are exported or not.
Definition: vtkRIBExporter.h:153
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkRIBExporter::~vtkRIBExporter
~vtkRIBExporter()
vtkExporter
abstract class to write a scene to a file
Definition: vtkExporter.h:47
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
vtkExporter.h
vtkRIBExporter::WriteLight
void WriteLight(vtkLight *aLight, int count)
vtkRIBExporter::WriteProperty
void WriteProperty(vtkProperty *aProperty, vtkTexture *aTexture)
vtkProperty
represent surface properties of a geometric object
Definition: vtkProperty.h:65
vtkRIBExporter::WriteTrailer
void WriteTrailer()
vtkRIBExporter::New
static vtkRIBExporter * New()
vtkRIBExporter::WriteAmbientLight
void WriteAmbientLight(int count)
vtkRIBExporter::WriteHeader
void WriteHeader(vtkRenderer *aRen)
Write the RIB header.
vtkRIBExporter::WriteTexture
void WriteTexture(vtkTexture *aTexture)
vtkRIBExporter::WriteStrips
void WriteStrips(vtkPolyData *pd, vtkUnsignedCharArray *colors, vtkProperty *aProperty)
vtkRIBExporter::ModifyArrayName
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...
vtkRIBExporter::WriteData
void WriteData()