VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkRIBExporter.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00051 #ifndef __vtkRIBExporter_h 00052 #define __vtkRIBExporter_h 00053 00054 #include "vtkIOExportModule.h" // For export macro 00055 #include "vtkExporter.h" 00056 00057 class vtkActor; 00058 class vtkCamera; 00059 class vtkLight; 00060 class vtkPolyData; 00061 class vtkProperty; 00062 class vtkRenderer; 00063 class vtkTexture; 00064 class vtkUnsignedCharArray; 00065 00066 class VTKIOEXPORT_EXPORT vtkRIBExporter : public vtkExporter 00067 { 00068 public: 00069 static vtkRIBExporter *New(); 00070 vtkTypeMacro(vtkRIBExporter,vtkExporter); 00071 void PrintSelf(ostream& os, vtkIndent indent); 00072 00074 00076 vtkSetVector2Macro(Size,int); 00077 vtkGetVectorMacro(Size,int,2); 00079 00081 00082 vtkSetVector2Macro(PixelSamples,int); 00083 vtkGetVectorMacro(PixelSamples,int,2); 00085 00087 00089 vtkSetStringMacro(FilePrefix); 00090 vtkGetStringMacro(FilePrefix); 00092 00094 00095 vtkSetStringMacro(TexturePrefix); 00096 vtkGetStringMacro(TexturePrefix); 00098 00100 00114 vtkSetMacro(Background,int); 00115 vtkGetMacro(Background,int); 00116 vtkBooleanMacro(Background,int); 00118 00120 00123 vtkSetClampMacro(ExportArrays, int, 0, 1); 00124 vtkBooleanMacro(ExportArrays, int); 00125 vtkGetMacro(ExportArrays, int); 00127 00128 protected: 00129 vtkRIBExporter(); 00130 ~vtkRIBExporter(); 00131 00132 int Background; 00133 int Size[2]; 00134 int PixelSamples[2]; 00135 00137 int ExportArrays; 00138 00140 00141 void WriteHeader (vtkRenderer *aRen); 00142 void WriteTrailer (); 00143 void WriteTexture (vtkTexture *aTexture); 00144 void WriteViewport (vtkRenderer *aRenderer, int size[2]); 00145 void WriteCamera (vtkCamera *aCamera); 00146 void WriteLight (vtkLight *aLight, int count); 00147 void WriteAmbientLight (int count); 00148 void WriteProperty (vtkProperty *aProperty, vtkTexture *aTexture); 00149 void WritePolygons (vtkPolyData *pd, vtkUnsignedCharArray *colors, 00150 vtkProperty *aProperty); 00151 void WriteStrips (vtkPolyData *pd, vtkUnsignedCharArray *colors, 00152 vtkProperty *aProperty); 00154 00155 void WriteData(); 00156 void WriteActor(vtkActor *anActor); 00157 00162 void ModifyArrayName(char *newname, const char* name); 00163 00164 char *GetTextureName (vtkTexture *aTexture); 00165 char *GetTIFFName (vtkTexture *aTexture); 00166 char *FilePrefix; 00167 FILE *FilePtr; 00168 char *TexturePrefix; 00169 private: 00170 vtkRIBExporter(const vtkRIBExporter&); // Not implemented. 00171 void operator=(const vtkRIBExporter&); // Not implemented. 00172 }; 00173 00174 #endif 00175