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