VTK
vtk3DSImporter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtk3DSImporter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
31 #ifndef vtk3DSImporter_h
32 #define vtk3DSImporter_h
33 
34 #include "vtkIOImportModule.h" // For export macro
35 #include "vtkImporter.h"
36 #include "vtk3DS.h" // Needed for all the 3DS structures
37 
38 class vtkPolyData;
39 
40 class VTKIOIMPORT_EXPORT vtk3DSImporter : public vtkImporter
41 {
42 public:
43  static vtk3DSImporter *New();
44 
45  vtkTypeMacro(vtk3DSImporter,vtkImporter);
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
49 
52  vtkSetStringMacro(FileName);
53  vtkGetStringMacro(FileName);
55 
57 
61  vtkSetMacro(ComputeNormals,vtkTypeBool);
62  vtkGetMacro(ComputeNormals,vtkTypeBool);
63  vtkBooleanMacro(ComputeNormals,vtkTypeBool);
65 
69  FILE *GetFileFD() {return this->FileFD;};
70 
71  vtk3DSOmniLight *OmniList;
72  vtk3DSSpotLight *SpotLightList;
73  vtk3DSCamera *CameraList;
74  vtk3DSMesh *MeshList;
75  vtk3DSMaterial *MaterialList;
76  vtk3DSMatProp *MatPropList;
77 
78 protected:
80  ~vtk3DSImporter() override;
81 
82  int ImportBegin () override;
83  void ImportEnd () override;
84  void ImportActors (vtkRenderer *renderer) override;
85  void ImportCameras (vtkRenderer *renderer) override;
86  void ImportLights (vtkRenderer *renderer) override;
87  void ImportProperties (vtkRenderer *renderer) override;
88  vtkPolyData *GeneratePolyData (vtk3DSMesh *meshPtr);
89  int Read3DS ();
90 
91  char *FileName;
92  FILE *FileFD;
94 private:
95  vtk3DSImporter(const vtk3DSImporter&) = delete;
96  void operator=(const vtk3DSImporter&) = delete;
97 };
98 
99 #endif
100 
vtkTypeBool ComputeNormals
vtk3DSMesh * MeshList
vtk3DSCamera * CameraList
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
imports 3D Studio files.
virtual void ImportCameras(vtkRenderer *)
Definition: vtkImporter.h:99
abstract specification for renderers
Definition: vtkRenderer.h:63
vtk3DSMatProp * MatPropList
vtk3DSOmniLight * OmniList
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
importer abstract class
Definition: vtkImporter.h:54
virtual void ImportEnd()
Definition: vtkImporter.h:97
virtual int ImportBegin()
Definition: vtkImporter.h:96
int vtkTypeBool
Definition: vtkABI.h:69
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void ImportActors(vtkRenderer *)
Definition: vtkImporter.h:98
virtual void ImportLights(vtkRenderer *)
Definition: vtkImporter.h:100
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtk3DSMaterial * MaterialList
virtual void ImportProperties(vtkRenderer *)
Definition: vtkImporter.h:101
vtk3DSSpotLight * SpotLightList