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 =========================================================================*/
51 #ifndef __vtkRIBExporter_h
52 #define __vtkRIBExporter_h
53 
54 #include "vtkExporter.h"
55 
56 class vtkActor;
57 class vtkCamera;
58 class vtkLight;
59 class vtkPolyData;
60 class vtkProperty;
61 class vtkRenderer;
62 class vtkTexture;
64 
66 {
67 public:
68  static vtkRIBExporter *New();
69  vtkTypeMacro(vtkRIBExporter,vtkExporter);
70  void PrintSelf(ostream& os, vtkIndent indent);
71 
73 
75  vtkSetVector2Macro(Size,int);
76  vtkGetVectorMacro(Size,int,2);
78 
80 
81  vtkSetVector2Macro(PixelSamples,int);
82  vtkGetVectorMacro(PixelSamples,int,2);
84 
86 
88  vtkSetStringMacro(FilePrefix);
89  vtkGetStringMacro(FilePrefix);
91 
93 
94  vtkSetStringMacro(TexturePrefix);
95  vtkGetStringMacro(TexturePrefix);
97 
99 
113  vtkSetMacro(Background,int);
114  vtkGetMacro(Background,int);
115  vtkBooleanMacro(Background,int);
117 
119 
122  vtkSetClampMacro(ExportArrays, int, 0, 1);
123  vtkBooleanMacro(ExportArrays, int);
124  vtkGetMacro(ExportArrays, int);
126 
127 protected:
128  vtkRIBExporter();
129  ~vtkRIBExporter();
130 
132  int Size[2];
133  int PixelSamples[2];
134 
137 
139 
140  void WriteHeader (vtkRenderer *aRen);
141  void WriteTrailer ();
142  void WriteTexture (vtkTexture *aTexture);
143  void WriteViewport (vtkRenderer *aRenderer, int size[2]);
144  void WriteCamera (vtkCamera *aCamera);
145  void WriteLight (vtkLight *aLight, int count);
146  void WriteAmbientLight (int count);
147  void WriteProperty (vtkProperty *aProperty, vtkTexture *aTexture);
148  void WritePolygons (vtkPolyData *pd, vtkUnsignedCharArray *colors,
149  vtkProperty *aProperty);
150  void WriteStrips (vtkPolyData *pd, vtkUnsignedCharArray *colors,
151  vtkProperty *aProperty);
153 
154  void WriteData();
155  void WriteActor(vtkActor *anActor);
156 
161  void ModifyArrayName(char *newname, const char* name);
162 
163  char *GetTextureName (vtkTexture *aTexture);
164  char *GetTIFFName (vtkTexture *aTexture);
165  char *FilePrefix;
166  FILE *FilePtr;
168 private:
169  vtkRIBExporter(const vtkRIBExporter&); // Not implemented.
170  void operator=(const vtkRIBExporter&); // Not implemented.
171 };
172 
173 #endif
174 
abstract class to write a scene to a file
Definition: vtkExporter.h:44
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:49
virtual void WriteData()=0
represent surface properties of a geometric object
Definition: vtkProperty.h:61
abstract specification for renderers
Definition: vtkRenderer.h:69
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:81
a simple class to control print indentation
Definition: vtkIndent.h:37
a virtual camera for 3D rendering
Definition: vtkCamera.h:47
a virtual light for 3D rendering
Definition: vtkLight.h:59
handles properties associated with a texture map
Definition: vtkTexture.h:68
dynamic, self-adjusting array of unsigned char
void PrintSelf(ostream &os, vtkIndent indent)
static vtkObject * New()
export a scene into RenderMan RIB format.
#define VTK_HYBRID_EXPORT