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 
53 class VTKACCELERATORSVTKM_EXPORT vtkmLevelOfDetail : public vtkPolyDataAlgorithm
54 {
55 public:
57  void PrintSelf(ostream& os, vtkIndent indent) override;
58  static vtkmLevelOfDetail* New();
59 
60  // Description:
61  // Set/Get the number of divisions along an individual axis for the spatial
62  // bins.
63  // The number of spatial bins is NumberOfXDivisions*NumberOfYDivisions*
64  // NumberOfZDivisions.
65  void SetNumberOfXDivisions(int num);
66  void SetNumberOfYDivisions(int num);
67  void SetNumberOfZDivisions(int num);
68  int GetNumberOfXDivisions();
69  int GetNumberOfYDivisions();
70  int GetNumberOfZDivisions();
71 
72  // Description:
73  // Set/Get the number of divisions for each axis for the spatial bins.
74  // The number of spatial bins is NumberOfXDivisions*NumberOfYDivisions*
75  // NumberOfZDivisions.
76  void SetNumberOfDivisions(int div[3])
77  {
78  this->SetNumberOfDivisions(div[0], div[1], div[2]);
79  }
80  void SetNumberOfDivisions(int div0, int div1, int div2);
81 
82  const int* GetNumberOfDivisions();
83  void GetNumberOfDivisions(int div[3]);
84 
85 protected:
88 
90  vtkInformationVector*) override;
91 
92 private:
93  int NumberOfDivisions[3];
94 
95  vtkmLevelOfDetail(const vtkmLevelOfDetail&) = delete;
96  void operator=(const vtkmLevelOfDetail&) = delete;
97 };
98 
99 #endif // vtkmLevelOfDetail_h
100 // 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.
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.