TTK
Loading...
Searching...
No Matches
ttkIcosphere.h
Go to the documentation of this file.
1
11
12#pragma once
13
14// VTK Module
15#include <ttkIcosphereModule.h>
16
17// VTK Includes
18#include <ttkAlgorithm.h>
19
20// TTK Base Includes
21#include <Icosphere.h>
22
23class vtkDataArray;
24
25class TTKICOSPHERE_EXPORT ttkIcosphere : public ttkAlgorithm,
26 protected ttk::Icosphere {
27private:
28 int NumberOfSubdivisions{0};
29 double Radius{1};
30 bool ComputeNormals{false};
31
32 // single ico sphere
33 double Center[3]{0, 0, 0};
34
35 // alternately create a sphere at each point
36 vtkDataArray *Centers{nullptr};
37
38public:
39 static ttkIcosphere *New();
40 vtkTypeMacro(ttkIcosphere, ttkAlgorithm);
41
42 vtkSetMacro(NumberOfSubdivisions, int);
43 vtkGetMacro(NumberOfSubdivisions, int);
44
45 vtkSetVector3Macro(Center, double);
46 vtkGetVector3Macro(Center, double);
47
48 vtkSetMacro(Radius, double);
49 vtkGetMacro(Radius, double);
50
51 vtkSetMacro(ComputeNormals, bool);
52 vtkGetMacro(ComputeNormals, bool);
53
54 vtkSetMacro(Centers, vtkDataArray *);
55 vtkGetMacro(Centers, vtkDataArray *);
56
57protected:
59 ~ttkIcosphere() override;
60
61 int FillInputPortInformation(int port, vtkInformation *info) override;
62 int FillOutputPortInformation(int port, vtkInformation *info) override;
63
64 int RequestData(vtkInformation *request,
65 vtkInformationVector **inputVector,
66 vtkInformationVector *outputVector) override;
67};
Baseclass of all VTK filters that wrap ttk modules.
Definition: ttkAlgorithm.h:34
virtual int RequestData(vtkInformation *ttkNotUsed(request), vtkInformationVector **ttkNotUsed(inputVectors), vtkInformationVector *ttkNotUsed(outputVector))
Definition: ttkAlgorithm.h:390
int FillInputPortInformation(int ttkNotUsed(port), vtkInformation *ttkNotUsed(info)) override
Definition: ttkAlgorithm.h:404
int FillOutputPortInformation(int ttkNotUsed(port), vtkInformation *ttkNotUsed(info)) override
Definition: ttkAlgorithm.h:419
static ttkIcosphere * New()
~ttkIcosphere() override