VTK  9.2.6
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 =========================================================================*/
28 #ifndef vtk3DSImporter_h
29 #define vtk3DSImporter_h
30 
31 #include "vtk3DS.h" // Needed for all the 3DS structures
32 #include "vtkIOImportModule.h" // For export macro
33 #include "vtkImporter.h"
34 
35 class vtkPolyData;
36 
37 class VTKIOIMPORT_EXPORT vtk3DSImporter : public vtkImporter
38 {
39 public:
40  static vtk3DSImporter* New();
41 
42  vtkTypeMacro(vtk3DSImporter, vtkImporter);
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
49  vtkSetFilePathMacro(FileName);
50  vtkGetFilePathMacro(FileName);
52 
54 
58  vtkSetMacro(ComputeNormals, vtkTypeBool);
59  vtkGetMacro(ComputeNormals, vtkTypeBool);
60  vtkBooleanMacro(ComputeNormals, vtkTypeBool);
62 
67 
71  FILE* GetFileFD() { return this->FileFD; }
72 
73  vtk3DSOmniLight* OmniList;
74  vtk3DSSpotLight* SpotLightList;
75  vtk3DSCamera* CameraList;
76  vtk3DSMesh* MeshList;
77  vtk3DSMaterial* MaterialList;
78  vtk3DSMatProp* MatPropList;
79 
80 protected:
82  ~vtk3DSImporter() override;
83 
84  int ImportBegin() override;
85  void ImportEnd() override;
86  void ImportActors(vtkRenderer* renderer) override;
87  void ImportCameras(vtkRenderer* renderer) override;
88  void ImportLights(vtkRenderer* renderer) override;
89  void ImportProperties(vtkRenderer* renderer) override;
90  vtkPolyData* GeneratePolyData(vtk3DSMesh* meshPtr);
91  int Read3DS();
92 
93  char* FileName;
94  FILE* FileFD;
96 
97 private:
98  vtk3DSImporter(const vtk3DSImporter&) = delete;
99  void operator=(const vtk3DSImporter&) = delete;
100 };
101 
102 #endif
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:161
abstract specification for renderers
Definition: vtkRenderer.h:72
vtk3DSMatProp * MatPropList
vtk3DSOmniLight * OmniList
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
importer abstract class
Definition: vtkImporter.h:59
virtual void ImportEnd()
Definition: vtkImporter.h:159
virtual int ImportBegin()
Definition: vtkImporter.h:158
int vtkTypeBool
Definition: vtkABI.h:69
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual std::string GetOutputsDescription()
Recover a printable string that let importer implementation Describe their outputs.
Definition: vtkImporter.h:98
virtual void ImportActors(vtkRenderer *)
Definition: vtkImporter.h:160
virtual void ImportLights(vtkRenderer *)
Definition: vtkImporter.h:162
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtk3DSMaterial * MaterialList
FILE * GetFileFD()
Return the file pointer to the open file.
virtual void ImportProperties(vtkRenderer *)
Definition: vtkImporter.h:163
vtk3DSSpotLight * SpotLightList