VTK
vtkmLevelOfDetail.h
Go to the documentation of this file.
1 //=============================================================================
2 //
3 // Copyright (c) Kitware, Inc.
4 // All rights reserved.
5 // See LICENSE.txt for details.
6 //
7 // This software is distributed WITHOUT ANY WARRANTY; without even
8 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 // PURPOSE. See the above copyright notice for more information.
10 //
11 // Copyright 2012 Sandia Corporation.
12 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
13 // the U.S. Government retains certain rights in this software.
14 //
15 //=============================================================================
47 #ifndef vtkmLevelOfDetail_h
48 #define vtkmLevelOfDetail_h
49 
50 #include "vtkPolyDataAlgorithm.h"
51 #include "vtkAcceleratorsVTKmModule.h" //required for correct implementation
52 #include "vtkmConfig.h" //required for general vtkm setup
53 
54 class VTKACCELERATORSVTKM_EXPORT vtkmLevelOfDetail : public vtkPolyDataAlgorithm
55 {
56 public:
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59  static vtkmLevelOfDetail* New();
60 
61  // Description:
62  // Set/Get the number of divisions along an individual axis for the spatial
63  // bins.
64  // The number of spatial bins is NumberOfXDivisions*NumberOfYDivisions*
65  // NumberOfZDivisions.
66  void SetNumberOfXDivisions(int num);
67  void SetNumberOfYDivisions(int num);
68  void SetNumberOfZDivisions(int num);
69  int GetNumberOfXDivisions();
70  int GetNumberOfYDivisions();
71  int GetNumberOfZDivisions();
72 
73  // Description:
74  // Set/Get the number of divisions for each axis for the spatial bins.
75  // The number of spatial bins is NumberOfXDivisions*NumberOfYDivisions*
76  // NumberOfZDivisions.
77  void SetNumberOfDivisions(int div[3])
78  {
79  this->SetNumberOfDivisions(div[0], div[1], div[2]);
80  }
81  void SetNumberOfDivisions(int div0, int div1, int div2);
82 
83  const int* GetNumberOfDivisions();
84  void GetNumberOfDivisions(int div[3]);
85 
86 protected:
89 
91  vtkInformationVector*) override;
92 
93 private:
94  int NumberOfDivisions[3];
95 
96  vtkmLevelOfDetail(const vtkmLevelOfDetail&) = delete;
97  void operator=(const vtkmLevelOfDetail&) = delete;
98 };
99 
100 #endif // vtkmLevelOfDetail_h
101 // VTK-HeaderTest-Exclude: 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:39
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.