VTK  9.5.20250718
vtkPlatonicSolidSource.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
109#ifndef vtkPlatonicSolidSource_h
110#define vtkPlatonicSolidSource_h
111
112#include "vtkFiltersSourcesModule.h" // For export macro
113#include "vtkPolyDataAlgorithm.h"
114
115#define VTK_SOLID_TETRAHEDRON 0
116#define VTK_SOLID_CUBE 1
117#define VTK_SOLID_OCTAHEDRON 2
118#define VTK_SOLID_ICOSAHEDRON 3
119#define VTK_SOLID_DODECAHEDRON 4
120
121VTK_ABI_NAMESPACE_BEGIN
122class VTKFILTERSSOURCES_EXPORT vtkPlatonicSolidSource : public vtkPolyDataAlgorithm
123{
124public:
127 void PrintSelf(ostream& os, vtkIndent indent) override;
128
130
133 vtkSetClampMacro(SolidType, int, VTK_SOLID_TETRAHEDRON, VTK_SOLID_DODECAHEDRON);
134 vtkGetMacro(SolidType, int);
135 void SetSolidTypeToTetrahedron() { this->SetSolidType(VTK_SOLID_TETRAHEDRON); }
136 void SetSolidTypeToCube() { this->SetSolidType(VTK_SOLID_CUBE); }
137 void SetSolidTypeToOctahedron() { this->SetSolidType(VTK_SOLID_OCTAHEDRON); }
138 void SetSolidTypeToIcosahedron() { this->SetSolidType(VTK_SOLID_ICOSAHEDRON); }
141
143
148 vtkSetMacro(OutputPointsPrecision, int);
149 vtkGetMacro(OutputPointsPrecision, int);
151
152protected:
154 ~vtkPlatonicSolidSource() override = default;
155
159
160private:
162 void operator=(const vtkPlatonicSolidSource&) = delete;
163};
164
165VTK_ABI_NAMESPACE_END
166#endif
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
produce polygonal Platonic solids
static vtkPlatonicSolidSource * New()
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetSolidTypeToTetrahedron()
Specify the type of PlatonicSolid solid to create.
~vtkPlatonicSolidSource() override=default
void SetSolidTypeToIcosahedron()
Specify the type of PlatonicSolid solid to create.
void SetSolidTypeToOctahedron()
Specify the type of PlatonicSolid solid to create.
void SetSolidTypeToDodecahedron()
Specify the type of PlatonicSolid solid to create.
void SetSolidTypeToCube()
Specify the type of PlatonicSolid solid to create.
Superclass for algorithms that produce only polydata as output.
#define VTK_SOLID_DODECAHEDRON
#define VTK_SOLID_TETRAHEDRON
#define VTK_SOLID_CUBE
#define VTK_SOLID_OCTAHEDRON
#define VTK_SOLID_ICOSAHEDRON