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 =========================================================================*/
35 #ifndef vtkSTLReader_h
36 #define vtkSTLReader_h
37 
38 #include "vtkIOGeometryModule.h" // For export macro
40 
41 class vtkCellArray;
42 class vtkFloatArray;
44 class vtkPoints;
45 
46 class VTKIOGEOMETRY_EXPORT vtkSTLReader : public vtkAbstractPolyDataReader
47 {
48 public:
50  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
51 
55  static vtkSTLReader *New();
56 
61  vtkMTimeType GetMTime() VTK_OVERRIDE;
62 
64 
67  vtkSetMacro(Merging,int);
68  vtkGetMacro(Merging,int);
69  vtkBooleanMacro(Merging,int);
71 
73 
76  vtkSetMacro(ScalarTags,int);
77  vtkGetMacro(ScalarTags,int);
78  vtkBooleanMacro(ScalarTags,int);
80 
82 
86  void SetLocator(vtkIncrementalPointLocator *locator);
87  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
89 
90 protected:
91  vtkSTLReader();
92  ~vtkSTLReader() VTK_OVERRIDE;
93 
97  vtkIncrementalPointLocator* NewDefaultLocator();
98 
99  int Merging;
100  int ScalarTags;
101  vtkIncrementalPointLocator *Locator;
102 
103  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
104  bool ReadBinarySTL(FILE *fp, vtkPoints*, vtkCellArray*);
105  bool ReadASCIISTL(FILE *fp, vtkPoints*, vtkCellArray*,
106  vtkFloatArray* scalars=0);
107  int GetSTLFileType(const char *filename);
108 private:
109  vtkSTLReader(const vtkSTLReader&) VTK_DELETE_FUNCTION;
110  void operator=(const vtkSTLReader&) VTK_DELETE_FUNCTION;
111 };
112 
113 #endif
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
read ASCII or binary stereo lithography files
Definition: vtkSTLReader.h:46
Abstract class in support of both point location and point insertion.
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:35
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that read models from a file.
a simple class to control print indentation
Definition: vtkIndent.h:33
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
object to represent cell connectivity
Definition: vtkCellArray.h:44
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
represent and manipulate 3D points
Definition: vtkPoints.h:33