VTK  9.3.1
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
17 #ifndef vtkPlatonicSolidSource_h
18 #define vtkPlatonicSolidSource_h
19 
20 #include "vtkFiltersSourcesModule.h" // For export macro
21 #include "vtkPolyDataAlgorithm.h"
22 
23 #define VTK_SOLID_TETRAHEDRON 0
24 #define VTK_SOLID_CUBE 1
25 #define VTK_SOLID_OCTAHEDRON 2
26 #define VTK_SOLID_ICOSAHEDRON 3
27 #define VTK_SOLID_DODECAHEDRON 4
28 
29 VTK_ABI_NAMESPACE_BEGIN
30 class VTKFILTERSSOURCES_EXPORT vtkPlatonicSolidSource : public vtkPolyDataAlgorithm
31 {
32 public:
33  static vtkPlatonicSolidSource* New();
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
38 
41  vtkSetClampMacro(SolidType, int, VTK_SOLID_TETRAHEDRON, VTK_SOLID_DODECAHEDRON);
42  vtkGetMacro(SolidType, int);
43  void SetSolidTypeToTetrahedron() { this->SetSolidType(VTK_SOLID_TETRAHEDRON); }
44  void SetSolidTypeToCube() { this->SetSolidType(VTK_SOLID_CUBE); }
45  void SetSolidTypeToOctahedron() { this->SetSolidType(VTK_SOLID_OCTAHEDRON); }
46  void SetSolidTypeToIcosahedron() { this->SetSolidType(VTK_SOLID_ICOSAHEDRON); }
47  void SetSolidTypeToDodecahedron() { this->SetSolidType(VTK_SOLID_DODECAHEDRON); }
49 
51 
56  vtkSetMacro(OutputPointsPrecision, int);
57  vtkGetMacro(OutputPointsPrecision, int);
59 
60 protected:
62  ~vtkPlatonicSolidSource() override = default;
63 
65  int SolidType;
67 
68 private:
70  void operator=(const vtkPlatonicSolidSource&) = delete;
71 };
72 
73 VTK_ABI_NAMESPACE_END
74 #endif
void SetSolidTypeToTetrahedron()
Specify the type of PlatonicSolid solid to create.
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
void SetSolidTypeToIcosahedron()
Specify the type of PlatonicSolid solid to create.
void SetSolidTypeToOctahedron()
Specify the type of PlatonicSolid solid to create.
static vtkPolyDataAlgorithm * New()
#define VTK_SOLID_ICOSAHEDRON
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
void SetSolidTypeToCube()
Specify the type of PlatonicSolid solid to create.
#define VTK_SOLID_CUBE
Store zero or more vtkInformation instances.
produce polygonal Platonic solids
void SetSolidTypeToDodecahedron()
Specify the type of PlatonicSolid solid to create.
#define VTK_SOLID_DODECAHEDRON
#define VTK_SOLID_OCTAHEDRON
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define VTK_SOLID_TETRAHEDRON