Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkRIBExporter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkRIBExporter.h,v $
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 =========================================================================*/
00064 #ifndef __vtkRIBExporter_h
00065 #define __vtkRIBExporter_h
00066 
00067 #include "vtkExporter.h"
00068 
00069 class vtkActor;
00070 class vtkCamera;
00071 class vtkLight;
00072 class vtkPolyData;
00073 class vtkProperty;
00074 class vtkRenderer;
00075 class vtkTexture;
00076 class vtkUnsignedCharArray;
00077 
00078 class VTK_HYBRID_EXPORT vtkRIBExporter : public vtkExporter
00079 {
00080 public:
00081   static vtkRIBExporter *New();
00082   vtkTypeRevisionMacro(vtkRIBExporter,vtkExporter);
00083   void PrintSelf(ostream& os, vtkIndent indent);
00084 
00086 
00088   vtkSetVector2Macro(Size,int);
00089   vtkGetVectorMacro(Size,int,2);
00091 
00093 
00094   vtkSetVector2Macro(PixelSamples,int);
00095   vtkGetVectorMacro(PixelSamples,int,2);
00097 
00099 
00101   vtkSetStringMacro(FilePrefix);
00102   vtkGetStringMacro(FilePrefix);
00104 
00106 
00107   vtkSetStringMacro(TexturePrefix);
00108   vtkGetStringMacro(TexturePrefix);
00110 
00112 
00126   vtkSetMacro(Background,int);
00127   vtkGetMacro(Background,int);
00128   vtkBooleanMacro(Background,int);
00130 
00132 
00135   vtkSetClampMacro(ExportArrays, int, 0, 1);
00136   vtkBooleanMacro(ExportArrays, int);
00137   vtkGetMacro(ExportArrays, int);
00139 
00140 protected:
00141   vtkRIBExporter();
00142   ~vtkRIBExporter();
00143 
00144   int Background;
00145   int Size[2];
00146   int PixelSamples[2];
00147 
00149   int ExportArrays;
00150 
00152 
00153   void WriteHeader (vtkRenderer *aRen);
00154   void WriteTrailer ();
00155   void WriteTexture (vtkTexture *aTexture);
00156   void WriteViewport (vtkRenderer *aRenderer, int size[2]);
00157   void WriteCamera (vtkCamera *aCamera);
00158   void WriteLight (vtkLight *aLight, int count);
00159   void WriteAmbientLight (int count);
00160   void WriteProperty (vtkProperty *aProperty, vtkTexture *aTexture);
00161   void WritePolygons (vtkPolyData *pd, vtkUnsignedCharArray *colors, 
00162                       vtkProperty *aProperty);
00163   void WriteStrips (vtkPolyData *pd, vtkUnsignedCharArray *colors, 
00164                     vtkProperty *aProperty);
00166 
00167   void WriteData();
00168   void WriteActor(vtkActor *anActor);
00169   
00174   void ModifyArrayName(char *newname, const char* name);
00175 
00176   char *GetTextureName (vtkTexture *aTexture);
00177   char *GetTIFFName (vtkTexture *aTexture);
00178   char *FilePrefix;
00179   FILE *FilePtr;
00180   char *TexturePrefix;
00181 private:
00182   vtkRIBExporter(const vtkRIBExporter&);  // Not implemented.
00183   void operator=(const vtkRIBExporter&);  // Not implemented.
00184 };
00185 
00186 #endif
00187