VTK  9.7.1
vtkmLevelOfDetail.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright (c) Kitware, Inc.
3 // SPDX-FileCopyrightText: Copyright 2012 Sandia Corporation.
4 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
36 #ifndef vtkmLevelOfDetail_h
37 #define vtkmLevelOfDetail_h
38 
39 #include "vtkAcceleratorsVTKmFiltersModule.h" //required for correct implementation
40 #include "vtkPolyDataAlgorithm.h"
41 #include "vtkmAlgorithm.h" // For vtkmAlgorithm
42 #include "vtkmlib/vtkmInitializer.h" // Need for initializing viskores
43 
44 #ifndef __VTK_WRAP__
45 #define vtkPolyDataAlgorithm vtkmAlgorithm<vtkPolyDataAlgorithm>
46 #endif
47 
48 VTK_ABI_NAMESPACE_BEGIN
49 class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmLevelOfDetail : public vtkPolyDataAlgorithm
50 {
51 public:
53 #ifndef __VTK_WRAP__
54 #undef vtkPolyDataAlgorithm
55 #endif
56  void PrintSelf(ostream& os, vtkIndent indent) override;
57  static vtkmLevelOfDetail* New();
58 
59  // Description:
60  // Set/Get the number of divisions along an individual axis for the spatial
61  // bins.
62  // The number of spatial bins is NumberOfXDivisions*NumberOfYDivisions*
63  // NumberOfZDivisions.
64  void SetNumberOfXDivisions(int num);
65  void SetNumberOfYDivisions(int num);
66  void SetNumberOfZDivisions(int num);
67  int GetNumberOfXDivisions();
68  int GetNumberOfYDivisions();
69  int GetNumberOfZDivisions();
70 
71  // Description:
72  // Set/Get the number of divisions for each axis for the spatial bins.
73  // The number of spatial bins is NumberOfXDivisions*NumberOfYDivisions*
74  // NumberOfZDivisions.
75  void SetNumberOfDivisions(int div[3]) { this->SetNumberOfDivisions(div[0], div[1], div[2]); }
76  void SetNumberOfDivisions(int div0, int div1, int div2);
77 
78  const int* GetNumberOfDivisions();
79  void GetNumberOfDivisions(int div[3]);
80 
81 protected:
83  ~vtkmLevelOfDetail() override;
84 
86 
87 private:
88  int NumberOfDivisions[3];
89 
90  vtkmLevelOfDetail(const vtkmLevelOfDetail&) = delete;
91  void operator=(const vtkmLevelOfDetail&) = delete;
92  vtkmInitializer Initializer;
93 };
94 
95 VTK_ABI_NAMESPACE_END
96 #endif // vtkmLevelOfDetail_h
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
void SetNumberOfDivisions(int div[3])
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
reduce the number of triangles in a mesh
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.