00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtk3DSImporter.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 =========================================================================*/ 00030 #ifndef __vtk3DSImporter_h 00031 #define __vtk3DSImporter_h 00032 00033 #include "vtkImporter.h" 00034 #include "vtk3DS.h" // Needed for all the 3DS structures 00035 00036 class vtkPolyData; 00037 00038 class VTK_HYBRID_EXPORT vtk3DSImporter : public vtkImporter 00039 { 00040 public: 00041 static vtk3DSImporter *New(); 00042 00043 vtkTypeRevisionMacro(vtk3DSImporter,vtkImporter); 00044 void PrintSelf(ostream& os, vtkIndent indent); 00045 00047 00048 vtkSetStringMacro(FileName); 00049 vtkGetStringMacro(FileName); 00051 00053 00055 vtkSetMacro(ComputeNormals,int); 00056 vtkGetMacro(ComputeNormals,int); 00057 vtkBooleanMacro(ComputeNormals,int); 00059 00061 FILE *GetFileFD() {return this->FileFD;}; 00062 00063 vtk3DSOmniLight *OmniList; 00064 vtk3DSSpotLight *SpotLightList; 00065 vtk3DSCamera *CameraList; 00066 vtk3DSMesh *MeshList; 00067 vtk3DSMaterial *MaterialList; 00068 vtk3DSMatProp *MatPropList; 00069 00070 protected: 00071 vtk3DSImporter(); 00072 ~vtk3DSImporter(); 00073 00074 virtual int ImportBegin (); 00075 virtual void ImportEnd (); 00076 virtual void ImportActors (vtkRenderer *renderer); 00077 virtual void ImportCameras (vtkRenderer *renderer); 00078 virtual void ImportLights (vtkRenderer *renderer); 00079 virtual void ImportProperties (vtkRenderer *renderer); 00080 vtkPolyData *GeneratePolyData (vtk3DSMesh *meshPtr); 00081 int Read3DS (); 00082 00083 char *FileName; 00084 FILE *FileFD; 00085 int ComputeNormals; 00086 private: 00087 vtk3DSImporter(const vtk3DSImporter&); // Not implemented. 00088 void operator=(const vtk3DSImporter&); // Not implemented. 00089 }; 00090 00091 #endif 00092