VTK  9.5.20251214
vtkSTLReader.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
134
135#ifndef vtkSTLReader_h
136#define vtkSTLReader_h
137
139#include "vtkIOGeometryModule.h" // For export macro
140
141VTK_ABI_NAMESPACE_BEGIN
142class vtkCellArray;
143class vtkFloatArray;
145class vtkPoints;
148
149class VTKIOGEOMETRY_EXPORT vtkSTLReader : public vtkAbstractPolyDataReader
150{
151public:
153 void PrintSelf(ostream& os, vtkIndent indent) override;
154
158 static vtkSTLReader* New();
159
165
167
171 vtkSetMacro(RelaxedConformance, bool);
172 vtkGetMacro(RelaxedConformance, bool);
173 vtkBooleanMacro(RelaxedConformance, bool);
175
177
181 vtkSetMacro(Merging, vtkTypeBool);
182 vtkGetMacro(Merging, vtkTypeBool);
183 vtkBooleanMacro(Merging, vtkTypeBool);
185
187
191 vtkSetMacro(ScalarTags, vtkTypeBool);
192 vtkGetMacro(ScalarTags, vtkTypeBool);
193 vtkBooleanMacro(ScalarTags, vtkTypeBool);
195
197
204
214 vtkGetStringMacro(Header);
215
223
224protected:
226 ~vtkSTLReader() override;
227
232
236 vtkSetStringMacro(Header);
237 virtual void SetBinaryHeader(vtkUnsignedCharArray* binaryHeader);
238
242 char* Header = nullptr;
244
246
247private:
248 bool RelaxedConformance = true;
249
250 vtkSTLReader(const vtkSTLReader&) = delete;
251 void operator=(const vtkSTLReader&) = delete;
252
253 bool ReadBinarySTL(vtkResourceStream* stream, vtkPoints*, vtkCellArray*);
254 bool ReadASCIISTL(
255 vtkResourceParser* parser, vtkPoints*, vtkCellArray*, vtkFloatArray* scalars = nullptr);
256};
257
258VTK_ABI_NAMESPACE_END
259#endif
object to represent cell connectivity
dynamic, self-adjusting array of float
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition vtkPoints.h:139
Helper class to perform formatted input from vtkResourceStream.
Abstract class used for custom streams.
void SetLocator(vtkIncrementalPointLocator *locator)
Specify a spatial locator for merging points.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIncrementalPointLocator * Locator
vtkIncrementalPointLocator * NewDefaultLocator()
Create default locator.
vtkTypeBool ScalarTags
vtkMTimeType GetMTime() override
Overload standard modified time function.
vtkUnsignedCharArray * BinaryHeader
static vtkSTLReader * New()
Construct object with default options.
vtkTypeBool Merging
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
virtual void SetBinaryHeader(vtkUnsignedCharArray *binaryHeader)
~vtkSTLReader() override
dynamic, self-adjusting array of unsigned char
int vtkTypeBool
Definition vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:322