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

Hybrid/vtkRIBExporter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkRIBExporter.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00055 #ifndef __vtkRIBExporter_h
00056 #define __vtkRIBExporter_h
00057 
00058 #include "vtkExporter.h"
00059 
00060 class vtkActor;
00061 class vtkCamera;
00062 class vtkLight;
00063 class vtkPolyData;
00064 class vtkProperty;
00065 class vtkRenderer;
00066 class vtkTexture;
00067 class vtkUnsignedCharArray;
00068 
00069 class VTK_HYBRID_EXPORT vtkRIBExporter : public vtkExporter
00070 {
00071 public:
00072   static vtkRIBExporter *New();
00073   vtkTypeRevisionMacro(vtkRIBExporter,vtkExporter);
00074   void PrintSelf(ostream& os, vtkIndent indent);
00075 
00077 
00079   vtkSetVector2Macro(Size,int);
00080   vtkGetVectorMacro(Size,int,2);
00082 
00084 
00085   vtkSetVector2Macro(PixelSamples,int);
00086   vtkGetVectorMacro(PixelSamples,int,2);
00088 
00090 
00092   vtkSetStringMacro(FilePrefix);
00093   vtkGetStringMacro(FilePrefix);
00095 
00097 
00098   vtkSetStringMacro(TexturePrefix);
00099   vtkGetStringMacro(TexturePrefix);
00101 
00103 
00117   vtkSetMacro(Background,int);
00118   vtkGetMacro(Background,int);
00119   vtkBooleanMacro(Background,int);
00121 
00123 
00126   vtkSetClampMacro(ExportArrays, int, 0, 1);
00127   vtkBooleanMacro(ExportArrays, int);
00128   vtkGetMacro(ExportArrays, int);
00130 
00131 protected:
00132   vtkRIBExporter();
00133   ~vtkRIBExporter();
00134 
00135   int Background;
00136   int Size[2];
00137   int PixelSamples[2];
00138 
00140   int ExportArrays;
00141 
00143 
00144   void WriteHeader (vtkRenderer *aRen);
00145   void WriteTrailer ();
00146   void WriteTexture (vtkTexture *aTexture);
00147   void WriteViewport (vtkRenderer *aRenderer, int size[2]);
00148   void WriteCamera (vtkCamera *aCamera);
00149   void WriteLight (vtkLight *aLight, int count);
00150   void WriteAmbientLight (int count);
00151   void WriteProperty (vtkProperty *aProperty, vtkTexture *aTexture);
00152   void WritePolygons (vtkPolyData *pd, vtkUnsignedCharArray *colors, 
00153                       vtkProperty *aProperty);
00154   void WriteStrips (vtkPolyData *pd, vtkUnsignedCharArray *colors, 
00155                     vtkProperty *aProperty);
00157 
00158   void WriteData();
00159   void WriteActor(vtkActor *anActor);
00160   
00165   void ModifyArrayName(char *newname, const char* name);
00166 
00167   char *GetTextureName (vtkTexture *aTexture);
00168   char *GetTIFFName (vtkTexture *aTexture);
00169   char *FilePrefix;
00170   FILE *FilePtr;
00171   char *TexturePrefix;
00172 private:
00173   vtkRIBExporter(const vtkRIBExporter&);  // Not implemented.
00174   void operator=(const vtkRIBExporter&);  // Not implemented.
00175 };
00176 
00177 #endif
00178