VTK  9.7.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
20 #ifndef vtkPlatonicSolidSource_h
21 #define vtkPlatonicSolidSource_h
22 
23 #include "vtkFiltersSourcesModule.h" // For export macro
24 #include "vtkPolyDataAlgorithm.h"
25 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
26 
27 #define VTK_SOLID_TETRAHEDRON 0
28 #define VTK_SOLID_CUBE 1
29 #define VTK_SOLID_OCTAHEDRON 2
30 #define VTK_SOLID_ICOSAHEDRON 3
31 #define VTK_SOLID_DODECAHEDRON 4
32 
33 VTK_ABI_NAMESPACE_BEGIN
34 class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkPlatonicSolidSource : public vtkPolyDataAlgorithm
35 {
36 public:
37  static vtkPlatonicSolidSource* New();
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
42 
45  vtkSetClampMacro(SolidType, int, VTK_SOLID_TETRAHEDRON, VTK_SOLID_DODECAHEDRON);
46  vtkGetMacro(SolidType, int);
47  void SetSolidTypeToTetrahedron() { this->SetSolidType(VTK_SOLID_TETRAHEDRON); }
48  void SetSolidTypeToCube() { this->SetSolidType(VTK_SOLID_CUBE); }
49  void SetSolidTypeToOctahedron() { this->SetSolidType(VTK_SOLID_OCTAHEDRON); }
50  void SetSolidTypeToIcosahedron() { this->SetSolidType(VTK_SOLID_ICOSAHEDRON); }
51  void SetSolidTypeToDodecahedron() { this->SetSolidType(VTK_SOLID_DODECAHEDRON); }
53 
55 
60  vtkSetMacro(OutputPointsPrecision, int);
61  vtkGetMacro(OutputPointsPrecision, int);
63 
64 protected:
66  ~vtkPlatonicSolidSource() override = default;
67 
69  int SolidType;
71 
72 private:
74  void operator=(const vtkPlatonicSolidSource&) = delete;
75 };
76 
77 VTK_ABI_NAMESPACE_END
78 #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
#define VTK_MARSHALAUTO
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