VTK  9.6.1
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
25
26#ifndef vtkSTLReader_h
27#define vtkSTLReader_h
28
30#include "vtkIOGeometryModule.h" // For export macro
31
32VTK_ABI_NAMESPACE_BEGIN
33class vtkCellArray;
34class vtkFloatArray;
36class vtkPoints;
39
40class VTKIOGEOMETRY_EXPORT vtkSTLReader : public vtkAbstractPolyDataReader
41{
42public:
44 void PrintSelf(ostream& os, vtkIndent indent) override;
45
49 static vtkSTLReader* New();
50
56
58
62 vtkSetMacro(RelaxedConformance, bool);
63 vtkGetMacro(RelaxedConformance, bool);
64 vtkBooleanMacro(RelaxedConformance, bool);
66
68
72 vtkSetMacro(Merging, vtkTypeBool);
73 vtkGetMacro(Merging, vtkTypeBool);
74 vtkBooleanMacro(Merging, vtkTypeBool);
76
78
82 vtkSetMacro(ScalarTags, vtkTypeBool);
83 vtkGetMacro(ScalarTags, vtkTypeBool);
84 vtkBooleanMacro(ScalarTags, vtkTypeBool);
86
88
95
105 vtkGetStringMacro(Header);
106
114
115protected:
117 ~vtkSTLReader() override;
118
123
127 vtkSetStringMacro(Header);
128 virtual void SetBinaryHeader(vtkUnsignedCharArray* binaryHeader);
129
133 char* Header = nullptr;
135
137
138private:
139 bool RelaxedConformance = true;
140
141 vtkSTLReader(const vtkSTLReader&) = delete;
142 void operator=(const vtkSTLReader&) = delete;
143
144 bool ReadBinarySTL(vtkResourceStream* stream, vtkPoints*, vtkCellArray*);
145 bool ReadASCIISTL(
146 vtkResourceParser* parser, vtkPoints*, vtkCellArray*, vtkFloatArray* scalars = nullptr);
147};
148
149VTK_ABI_NAMESPACE_END
150#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:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition vtkPoints.h:30
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:323