VTK  9.2.5
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 =========================================================================*/
118 #ifndef vtkPlatonicSolidSource_h
119 #define vtkPlatonicSolidSource_h
120 
121 #include "vtkFiltersSourcesModule.h" // For export macro
122 #include "vtkPolyDataAlgorithm.h"
123 
124 #define VTK_SOLID_TETRAHEDRON 0
125 #define VTK_SOLID_CUBE 1
126 #define VTK_SOLID_OCTAHEDRON 2
127 #define VTK_SOLID_ICOSAHEDRON 3
128 #define VTK_SOLID_DODECAHEDRON 4
129 
130 class VTKFILTERSSOURCES_EXPORT vtkPlatonicSolidSource : public vtkPolyDataAlgorithm
131 {
132 public:
135  void PrintSelf(ostream& os, vtkIndent indent) override;
136 
138 
141  vtkSetClampMacro(SolidType, int, VTK_SOLID_TETRAHEDRON, VTK_SOLID_DODECAHEDRON);
142  vtkGetMacro(SolidType, int);
143  void SetSolidTypeToTetrahedron() { this->SetSolidType(VTK_SOLID_TETRAHEDRON); }
144  void SetSolidTypeToCube() { this->SetSolidType(VTK_SOLID_CUBE); }
145  void SetSolidTypeToOctahedron() { this->SetSolidType(VTK_SOLID_OCTAHEDRON); }
146  void SetSolidTypeToIcosahedron() { this->SetSolidType(VTK_SOLID_ICOSAHEDRON); }
147  void SetSolidTypeToDodecahedron() { this->SetSolidType(VTK_SOLID_DODECAHEDRON); }
149 
151 
156  vtkSetMacro(OutputPointsPrecision, int);
157  vtkGetMacro(OutputPointsPrecision, int);
159 
160 protected:
162  ~vtkPlatonicSolidSource() override = default;
163 
167 
168 private:
170  void operator=(const vtkPlatonicSolidSource&) = delete;
171 };
172 
173 #endif
a simple class to control print indentation
Definition: vtkIndent.h:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
produce polygonal Platonic solids
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkPlatonicSolidSource * New()
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