VTK
vtkSTLReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSTLReader.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 =========================================================================*/
40 #ifndef __vtkSTLReader_h
41 #define __vtkSTLReader_h
42 
43 #include "vtkPolyDataAlgorithm.h"
44 
45 class vtkCellArray;
46 class vtkFloatArray;
48 class vtkPoints;
49 
51 {
52 public:
54  void PrintSelf(ostream& os, vtkIndent indent);
55 
57  static vtkSTLReader *New();
58 
61  unsigned long GetMTime();
62 
64 
65  vtkSetStringMacro(FileName);
66  vtkGetStringMacro(FileName);
68 
70 
71  vtkSetMacro(Merging,int);
72  vtkGetMacro(Merging,int);
73  vtkBooleanMacro(Merging,int);
75 
77 
78  vtkSetMacro(ScalarTags,int);
79  vtkGetMacro(ScalarTags,int);
80  vtkBooleanMacro(ScalarTags,int);
82 
84 
86  void SetLocator(vtkIncrementalPointLocator *locator);
87  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
89 
91  void CreateDefaultLocator();
92 
93 protected:
94  vtkSTLReader();
95  ~vtkSTLReader();
96 
97  char *FileName;
98  int Merging;
101 
103  int ReadBinarySTL(FILE *fp, vtkPoints*, vtkCellArray*);
104  int ReadASCIISTL(FILE *fp, vtkPoints*, vtkCellArray*,
105  vtkFloatArray* scalars=0);
106  int GetSTLFileType(const char *filename);
107 private:
108  vtkSTLReader(const vtkSTLReader&); // Not implemented.
109  void operator=(const vtkSTLReader&); // Not implemented.
110 };
111 
112 #endif