VTK  9.3.0
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
26#ifndef vtkPlatonicSolidSource_h
27#define vtkPlatonicSolidSource_h
28
29#include "vtkFiltersSourcesModule.h" // For export macro
31
32#define VTK_SOLID_TETRAHEDRON 0
33#define VTK_SOLID_CUBE 1
34#define VTK_SOLID_OCTAHEDRON 2
35#define VTK_SOLID_ICOSAHEDRON 3
36#define VTK_SOLID_DODECAHEDRON 4
37
38VTK_ABI_NAMESPACE_BEGIN
39class VTKFILTERSSOURCES_EXPORT vtkPlatonicSolidSource : public vtkPolyDataAlgorithm
40{
41public:
44 void PrintSelf(ostream& os, vtkIndent indent) override;
45
47
50 vtkSetClampMacro(SolidType, int, VTK_SOLID_TETRAHEDRON, VTK_SOLID_DODECAHEDRON);
51 vtkGetMacro(SolidType, int);
52 void SetSolidTypeToTetrahedron() { this->SetSolidType(VTK_SOLID_TETRAHEDRON); }
53 void SetSolidTypeToCube() { this->SetSolidType(VTK_SOLID_CUBE); }
54 void SetSolidTypeToOctahedron() { this->SetSolidType(VTK_SOLID_OCTAHEDRON); }
55 void SetSolidTypeToIcosahedron() { this->SetSolidType(VTK_SOLID_ICOSAHEDRON); }
56 void SetSolidTypeToDodecahedron() { this->SetSolidType(VTK_SOLID_DODECAHEDRON); }
58
60
65 vtkSetMacro(OutputPointsPrecision, int);
66 vtkGetMacro(OutputPointsPrecision, int);
68
69protected:
71 ~vtkPlatonicSolidSource() override = default;
72
76
77private:
79 void operator=(const vtkPlatonicSolidSource&) = delete;
80};
81
82VTK_ABI_NAMESPACE_END
83#endif
a simple class to control print indentation
Definition vtkIndent.h:38
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