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 =========================================================================*/
49 #ifndef vtkRIBExporter_h
50 #define vtkRIBExporter_h
51 
52 #include "vtkIOExportModule.h" // For export macro
53 #include "vtkExporter.h"
54 
55 class vtkActor;
56 class vtkCamera;
57 class vtkLight;
58 class vtkPolyData;
59 class vtkProperty;
60 class vtkRenderer;
61 class vtkTexture;
63 
64 class VTKIOEXPORT_EXPORT vtkRIBExporter : public vtkExporter
65 {
66 public:
67  static vtkRIBExporter *New();
68  vtkTypeMacro(vtkRIBExporter,vtkExporter);
69  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
70 
72 
76  vtkSetVector2Macro(Size,int);
77  vtkGetVectorMacro(Size,int,2);
79 
81 
84  vtkSetVector2Macro(PixelSamples,int);
85  vtkGetVectorMacro(PixelSamples,int,2);
87 
89 
93  vtkSetStringMacro(FilePrefix);
94  vtkGetStringMacro(FilePrefix);
96 
98 
101  vtkSetStringMacro(TexturePrefix);
102  vtkGetStringMacro(TexturePrefix);
104 
106 
123  vtkSetMacro(Background,int);
124  vtkGetMacro(Background,int);
127 
129 
134  vtkSetClampMacro(ExportArrays, int, 0, 1);
135  vtkBooleanMacro(ExportArrays, int);
136  vtkGetMacro(ExportArrays, int);
138 
139 protected:
140  vtkRIBExporter();
141  ~vtkRIBExporter() VTK_OVERRIDE;
142 
144  int Size[2];
145  int PixelSamples[2];
146 
150  int ExportArrays;
151 
153 
156  void WriteHeader (vtkRenderer *aRen);
157  void WriteTrailer ();
158  void WriteTexture (vtkTexture *aTexture);
159  void WriteViewport (vtkRenderer *aRenderer, int size[2]);
160  void WriteCamera (vtkCamera *aCamera);
161  void WriteLight (vtkLight *aLight, int count);
162  void WriteAmbientLight (int count);
163  void WriteProperty (vtkProperty *aProperty, vtkTexture *aTexture);
164  void WritePolygons (vtkPolyData *pd, vtkUnsignedCharArray *colors,
165  vtkProperty *aProperty);
166  void WriteStrips (vtkPolyData *pd, vtkUnsignedCharArray *colors,
167  vtkProperty *aProperty);
169 
170  void WriteData() VTK_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);
183  char *FilePrefix;
184  FILE *FilePtr;
185  char *TexturePrefix;
186 private:
187  vtkRIBExporter(const vtkRIBExporter&) VTK_DELETE_FUNCTION;
188  void operator=(const vtkRIBExporter&) VTK_DELETE_FUNCTION;
189 };
190 
191 #endif
192 
abstract class to write a scene to a file
Definition: vtkExporter.h:46
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
represent surface properties of a geometric object
Definition: vtkProperty.h:58
abstract specification for renderers
Definition: vtkRenderer.h:57
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
a simple class to control print indentation
Definition: vtkIndent.h:33
a virtual camera for 3D rendering
Definition: vtkCamera.h:44
a virtual light for 3D rendering
Definition: vtkLight.h:55
handles properties associated with a texture map
Definition: vtkTexture.h:64
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
dynamic, self-adjusting array of unsigned char
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
export a scene into RenderMan RIB format.