VTK: Filters/Sources/vtkPlatonicSolidSource.h Source File

| 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
26 #ifndef vtkPlatonicSolidSource_h
27 #define vtkPlatonicSolidSource_h
28
29 #include "vtkFiltersSourcesModule.h" // For export macro
30 #include "vtkPolyDataAlgorithm.h"
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
38 VTK_ABI_NAMESPACE_BEGIN
39 class VTKFILTERSSOURCES_EXPORT vtkPlatonicSolidSource : public vtkPolyDataAlgorithm
40 {
41 public:
42 static vtkPlatonicSolidSource* New();
43 vtkTypeMacro(vtkPlatonicSolidSource, vtkPolyDataAlgorithm);
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
69 protected:
70 vtkPlatonicSolidSource();
71 ~vtkPlatonicSolidSource() override = default;
72
73 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
74 int SolidType;
75 int OutputPointsPrecision;
76
77 private:
78 vtkPlatonicSolidSource(const vtkPlatonicSolidSource&) = delete;
79 void operator=(const vtkPlatonicSolidSource&) = delete;
80 };
81
82 VTK_ABI_NAMESPACE_END
83 #endif
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkPlatonicSolidSource
produce polygonal Platonic solids
Definition: vtkPlatonicSolidSource.h:40
vtkPlatonicSolidSource::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkPlatonicSolidSource::New
static vtkPlatonicSolidSource * New()
vtkPlatonicSolidSource::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPlatonicSolidSource::SetSolidTypeToTetrahedron
void SetSolidTypeToTetrahedron()
Specify the type of PlatonicSolid solid to create.
Definition: vtkPlatonicSolidSource.h:52
vtkPlatonicSolidSource::~vtkPlatonicSolidSource
~vtkPlatonicSolidSource() override=default
vtkPlatonicSolidSource::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkPlatonicSolidSource.h:75
vtkPlatonicSolidSource::SetSolidTypeToIcosahedron
void SetSolidTypeToIcosahedron()
Specify the type of PlatonicSolid solid to create.
Definition: vtkPlatonicSolidSource.h:55
vtkPlatonicSolidSource::SetSolidTypeToOctahedron
void SetSolidTypeToOctahedron()
Specify the type of PlatonicSolid solid to create.
Definition: vtkPlatonicSolidSource.h:54
vtkPlatonicSolidSource::SetSolidTypeToDodecahedron
void SetSolidTypeToDodecahedron()
Specify the type of PlatonicSolid solid to create.
Definition: vtkPlatonicSolidSource.h:56
vtkPlatonicSolidSource::vtkPlatonicSolidSource
vtkPlatonicSolidSource()
vtkPlatonicSolidSource::SetSolidTypeToCube
void SetSolidTypeToCube()
Specify the type of PlatonicSolid solid to create.
Definition: vtkPlatonicSolidSource.h:53
vtkPlatonicSolidSource::SolidType
int SolidType
Definition: vtkPlatonicSolidSource.h:74
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:43
VTK_SOLID_DODECAHEDRON
#define VTK_SOLID_DODECAHEDRON
Definition: vtkPlatonicSolidSource.h:36
VTK_SOLID_TETRAHEDRON
#define VTK_SOLID_TETRAHEDRON
Definition: vtkPlatonicSolidSource.h:32
VTK_SOLID_CUBE
#define VTK_SOLID_CUBE
Definition: vtkPlatonicSolidSource.h:33
VTK_SOLID_OCTAHEDRON
#define VTK_SOLID_OCTAHEDRON
Definition: vtkPlatonicSolidSource.h:34
VTK_SOLID_ICOSAHEDRON
#define VTK_SOLID_ICOSAHEDRON
Definition: vtkPlatonicSolidSource.h:35
vtkPolyDataAlgorithm.h