VTK  9.2.6
vtkPlatonicSolidSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPlatonicSolidSource.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
29 #ifndef vtkPlatonicSolidSource_h
30 #define vtkPlatonicSolidSource_h
31 
32 #include "vtkFiltersSourcesModule.h" // For export macro
33 #include "vtkPolyDataAlgorithm.h"
34 
35 #define VTK_SOLID_TETRAHEDRON 0
36 #define VTK_SOLID_CUBE 1
37 #define VTK_SOLID_OCTAHEDRON 2
38 #define VTK_SOLID_ICOSAHEDRON 3
39 #define VTK_SOLID_DODECAHEDRON 4
40 
41 class VTKFILTERSSOURCES_EXPORT vtkPlatonicSolidSource : public vtkPolyDataAlgorithm
42 {
43 public:
44  static vtkPlatonicSolidSource* New();
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
49 
52  vtkSetClampMacro(SolidType, int, VTK_SOLID_TETRAHEDRON, VTK_SOLID_DODECAHEDRON);
53  vtkGetMacro(SolidType, int);
54  void SetSolidTypeToTetrahedron() { this->SetSolidType(VTK_SOLID_TETRAHEDRON); }
55  void SetSolidTypeToCube() { this->SetSolidType(VTK_SOLID_CUBE); }
56  void SetSolidTypeToOctahedron() { this->SetSolidType(VTK_SOLID_OCTAHEDRON); }
57  void SetSolidTypeToIcosahedron() { this->SetSolidType(VTK_SOLID_ICOSAHEDRON); }
58  void SetSolidTypeToDodecahedron() { this->SetSolidType(VTK_SOLID_DODECAHEDRON); }
60 
62 
67  vtkSetMacro(OutputPointsPrecision, int);
68  vtkGetMacro(OutputPointsPrecision, int);
70 
71 protected:
73  ~vtkPlatonicSolidSource() override = default;
74 
76  int SolidType;
78 
79 private:
81  void operator=(const vtkPlatonicSolidSource&) = delete;
82 };
83 
84 #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:39
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