VTK
dox/Hybrid/vtkX3DExporter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkX3DExporter.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 =========================================================================*/
00029 #ifndef __vtkX3DExporter_h
00030 #define __vtkX3DExporter_h
00031 
00032 #include "vtkExporter.h"
00033 
00034 class vtkLight;
00035 class vtkActor;
00036 class vtkActor2D;
00037 class vtkPoints;
00038 class vtkDataArray;
00039 class vtkUnsignedCharArray;
00040 class vtkX3DExporterWriter;
00041 class vtkRenderer;
00042 
00043 class VTK_HYBRID_EXPORT vtkX3DExporter : public vtkExporter
00044 {
00045 public:
00046   static vtkX3DExporter *New();
00047   vtkTypeMacro(vtkX3DExporter,vtkExporter);
00048   void PrintSelf(ostream& os, vtkIndent indent);
00049 
00051 
00052   vtkSetStringMacro(FileName);
00053   vtkGetStringMacro(FileName);
00055 
00057 
00058   vtkSetMacro(Speed,double);
00059   vtkGetMacro(Speed,double);
00061 
00063 
00064   vtkSetClampMacro(Binary, int, 0, 1);
00065   vtkBooleanMacro(Binary, int);
00066   vtkGetMacro(Binary, int);
00068 
00070 
00071   vtkSetClampMacro(Fastest, int, 0, 1);
00072   vtkBooleanMacro(Fastest, int);
00073   vtkGetMacro(Fastest, int);
00075 
00076 protected:
00077   vtkX3DExporter();
00078   ~vtkX3DExporter();
00079 
00081   void WriteData();
00082 
00083   void WriteALight(vtkLight *aLight, vtkX3DExporterWriter* writer);
00084   void WriteAnActor(vtkActor *anActor, vtkX3DExporterWriter* writer,
00085     int index);
00086   void WritePointData(vtkPoints *points, vtkDataArray *normals,
00087     vtkDataArray *tcoords, vtkUnsignedCharArray *colors,
00088     vtkX3DExporterWriter* writer, int index);
00089   void WriteATextActor2D(vtkActor2D *anTextActor2D,
00090     vtkX3DExporterWriter* writer);
00091   void WriteATexture(vtkActor *anActor, vtkX3DExporterWriter* writer);
00092   void WriteAnAppearance(vtkActor *anActor, bool writeEmissiveColor, vtkX3DExporterWriter* writer);
00093   int HasHeadLight(vtkRenderer* ren);
00094   char *FileName;
00095   double Speed;
00096   int Binary;
00097   int Fastest;
00098 
00099 private:
00100 
00101   vtkX3DExporter(const vtkX3DExporter&); // Not implemented.
00102   void operator=(const vtkX3DExporter&); // Not implemented.
00103 };
00104 
00105 
00106 #endif