00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00079 #ifndef __vtkRIBExporter_h
00080 #define __vtkRIBExporter_h
00081
00082 #include <stdio.h>
00083 #include "vtkExporter.h"
00084 #include "vtkRenderer.h"
00085 #include "vtkTexture.h"
00086 #include "vtkPolyData.h"
00087
00088 class VTK_HYBRID_EXPORT vtkRIBExporter : public vtkExporter
00089 {
00090 public:
00091 static vtkRIBExporter *New();
00092 vtkTypeMacro(vtkRIBExporter,vtkExporter);
00093 void PrintSelf(ostream& os, vtkIndent indent);
00094
00096
00098 vtkSetVector2Macro(Size,int);
00099 vtkGetVectorMacro(Size,int,2);
00101
00103
00104 vtkSetVector2Macro(PixelSamples,int);
00105 vtkGetVectorMacro(PixelSamples,int,2);
00107
00109
00111 vtkSetStringMacro(FilePrefix);
00112 vtkGetStringMacro(FilePrefix);
00114
00116
00117 vtkSetStringMacro(TexturePrefix);
00118 vtkGetStringMacro(TexturePrefix);
00120
00122
00136 vtkSetMacro(Background,int);
00137 vtkGetMacro(Background,int);
00138 vtkBooleanMacro(Background,int);
00140
00141 protected:
00142 vtkRIBExporter();
00143 ~vtkRIBExporter();
00144
00145 int Background;
00146 int Size[2];
00147 int PixelSamples[2];
00149
00150 void WriteHeader (vtkRenderer *aRen);
00151 void WriteTrailer ();
00152 void WriteTexture (vtkTexture *aTexture);
00153 void WriteViewport (vtkRenderer *aRenderer, int size[2]);
00154 void WriteCamera (vtkCamera *aCamera);
00155 void WriteLight (vtkLight *aLight, int count);
00156 void WriteAmbientLight (int count);
00157 void WriteProperty (vtkProperty *aProperty, vtkTexture *aTexture);
00158 void WritePolygons (vtkPolyData *pd, vtkUnsignedCharArray *colors,
00159 vtkProperty *aProperty);
00160 void WriteStrips (vtkPolyData *pd, vtkUnsignedCharArray *colors,
00161 vtkProperty *aProperty);
00163
00164 void WriteData();
00165 void WriteActor(vtkActor *anActor);
00166 char *GetTextureName (vtkTexture *aTexture);
00167 char *GetTIFFName (vtkTexture *aTexture);
00168 char *FilePrefix;
00169 FILE *FilePtr;
00170 char *TexturePrefix;
00171 private:
00172 vtkRIBExporter(const vtkRIBExporter&);
00173 void operator=(const vtkRIBExporter&);
00174 };
00175
00176 #endif
00177