00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00051 #ifndef __vtkRIBExporter_h
00052 #define __vtkRIBExporter_h
00053
00054 #include "vtkExporter.h"
00055
00056 class vtkActor;
00057 class vtkCamera;
00058 class vtkLight;
00059 class vtkPolyData;
00060 class vtkProperty;
00061 class vtkRenderer;
00062 class vtkTexture;
00063 class vtkUnsignedCharArray;
00064
00065 class VTK_HYBRID_EXPORT vtkRIBExporter : public vtkExporter
00066 {
00067 public:
00068 static vtkRIBExporter *New();
00069 vtkTypeRevisionMacro(vtkRIBExporter,vtkExporter);
00070 void PrintSelf(ostream& os, vtkIndent indent);
00071
00073
00075 vtkSetVector2Macro(Size,int);
00076 vtkGetVectorMacro(Size,int,2);
00078
00080
00081 vtkSetVector2Macro(PixelSamples,int);
00082 vtkGetVectorMacro(PixelSamples,int,2);
00084
00086
00088 vtkSetStringMacro(FilePrefix);
00089 vtkGetStringMacro(FilePrefix);
00091
00093
00094 vtkSetStringMacro(TexturePrefix);
00095 vtkGetStringMacro(TexturePrefix);
00097
00099
00113 vtkSetMacro(Background,int);
00114 vtkGetMacro(Background,int);
00115 vtkBooleanMacro(Background,int);
00117
00119
00122 vtkSetClampMacro(ExportArrays, int, 0, 1);
00123 vtkBooleanMacro(ExportArrays, int);
00124 vtkGetMacro(ExportArrays, int);
00126
00127 protected:
00128 vtkRIBExporter();
00129 ~vtkRIBExporter();
00130
00131 int Background;
00132 int Size[2];
00133 int PixelSamples[2];
00134
00136 int ExportArrays;
00137
00139
00140 void WriteHeader (vtkRenderer *aRen);
00141 void WriteTrailer ();
00142 void WriteTexture (vtkTexture *aTexture);
00143 void WriteViewport (vtkRenderer *aRenderer, int size[2]);
00144 void WriteCamera (vtkCamera *aCamera);
00145 void WriteLight (vtkLight *aLight, int count);
00146 void WriteAmbientLight (int count);
00147 void WriteProperty (vtkProperty *aProperty, vtkTexture *aTexture);
00148 void WritePolygons (vtkPolyData *pd, vtkUnsignedCharArray *colors,
00149 vtkProperty *aProperty);
00150 void WriteStrips (vtkPolyData *pd, vtkUnsignedCharArray *colors,
00151 vtkProperty *aProperty);
00153
00154 void WriteData();
00155 void WriteActor(vtkActor *anActor);
00156
00161 void ModifyArrayName(char *newname, const char* name);
00162
00163 char *GetTextureName (vtkTexture *aTexture);
00164 char *GetTIFFName (vtkTexture *aTexture);
00165 char *FilePrefix;
00166 FILE *FilePtr;
00167 char *TexturePrefix;
00168 private:
00169 vtkRIBExporter(const vtkRIBExporter&);
00170 void operator=(const vtkRIBExporter&);
00171 };
00172
00173 #endif
00174