VTK  9.5.20251109
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
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
170 vtkSetMacro(Merging, vtkTypeBool);
171 vtkGetMacro(Merging, vtkTypeBool);
172 vtkBooleanMacro(Merging, vtkTypeBool);
174
176
179 vtkSetMacro(ScalarTags, vtkTypeBool);
180 vtkGetMacro(ScalarTags, vtkTypeBool);
181 vtkBooleanMacro(ScalarTags, vtkTypeBool);
183
185
190 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
192
202 vtkGetStringMacro(Header);
203
210 vtkGetObjectMacro(BinaryHeader, vtkUnsignedCharArray);
211
212protected:
214 ~vtkSTLReader() override;
215
220
224 vtkSetStringMacro(Header);
225 virtual void SetBinaryHeader(vtkUnsignedCharArray* binaryHeader);
226
230 char* Header;
232
234
235private:
236 vtkSTLReader(const vtkSTLReader&) = delete;
237 void operator=(const vtkSTLReader&) = delete;
238
239 bool ReadBinarySTL(vtkResourceStream* stream, vtkPoints*, vtkCellArray*);
240 bool ReadASCIISTL(
241 vtkResourceParser* parser, vtkPoints*, vtkCellArray*, vtkFloatArray* scalars = nullptr);
242};
243
244VTK_ABI_NAMESPACE_END
245#endif
Superclass for algorithms that read models from a file.
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.
read ASCII or binary stereo lithography files
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 merging set to true.
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