VTK  9.3.0
vtkProjectSphereFilter.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
23 #ifndef vtkProjectSphereFilter_h
24 #define vtkProjectSphereFilter_h
25 
26 #include "vtkFiltersGeometryModule.h" // For export macro
27 #include "vtkPointSetAlgorithm.h"
28 
29 VTK_ABI_NAMESPACE_BEGIN
30 class vtkCell;
31 class vtkCellArray;
33 class vtkIdList;
36 
37 class VTKFILTERSGEOMETRY_EXPORT vtkProjectSphereFilter : public vtkPointSetAlgorithm
38 {
39 public:
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
44 
46 
49  vtkSetVector3Macro(Center, double);
50  vtkGetVectorMacro(Center, double, 3);
52 
54 
58  vtkGetMacro(KeepPolePoints, bool);
59  vtkSetMacro(KeepPolePoints, bool);
60  vtkBooleanMacro(KeepPolePoints, bool);
62 
64 
69  vtkGetMacro(TranslateZ, bool);
70  vtkSetMacro(TranslateZ, bool);
71  vtkBooleanMacro(TranslateZ, bool);
73 
74 protected:
77 
79 
81 
84  void TransformTensors(vtkIdType id, double* coord, vtkDataSetAttributes* arrays);
85 
91  virtual void ComputePointsClosestToCenterLine(double, vtkIdList*) {}
92 
97  virtual double GetZTranslation(vtkPointSet* input);
98 
103  void SplitCell(vtkPointSet* input, vtkPointSet* output, vtkIdType inputCellId,
104  vtkIncrementalPointLocator* locator, vtkCellArray* connectivity, int splitSide);
105 
106  void SetCellInformation(vtkUnstructuredGrid* output, vtkCell* cell, vtkIdType numberOfNewCells);
107 
108 private:
110  void operator=(const vtkProjectSphereFilter&) = delete;
111 
112  double Center[3];
113  const double SplitLongitude;
114  bool KeepPolePoints;
115  bool TranslateZ;
116 };
117 
118 VTK_ABI_NAMESPACE_END
119 #endif // vtkProjectSphereFilter_h
object to represent cell connectivity
Definition: vtkCellArray.h:185
abstract class to specify cell behavior
Definition: vtkCell.h:59
represent and manipulate attribute data in a dataset
list of point or cell ids
Definition: vtkIdList.h:32
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce output of the same type as input.
concrete class for storing a set of points
Definition: vtkPointSet.h:68
A filter to 'unroll' a sphere.
void TransformCellInformation(vtkPointSet *input, vtkPointSet *output, vtkIdList *)
virtual double GetZTranslation(vtkPointSet *input)
If TranslateZ is true then this is the method that computes the amount to translate.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkProjectSphereFilter * New()
void TransformTensors(vtkIdType id, double *coord, vtkDataSetAttributes *arrays)
virtual void ComputePointsClosestToCenterLine(double, vtkIdList *)
Parallel part of the algorithm to figure out the closest point to the centerline (i....
void TransformPointInformation(vtkPointSet *input, vtkPointSet *output, vtkIdList *)
~vtkProjectSphereFilter() override
void SplitCell(vtkPointSet *input, vtkPointSet *output, vtkIdType inputCellId, vtkIncrementalPointLocator *locator, vtkCellArray *connectivity, int splitSide)
Split a cell into multiple cells because it stretches across the SplitLongitude.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void SetCellInformation(vtkUnstructuredGrid *output, vtkCell *cell, vtkIdType numberOfNewCells)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
dataset represents arbitrary combinations of all possible cell types
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
int vtkIdType
Definition: vtkType.h:315