VTK  9.0.1
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 "vtkAcceleratorsVTKmModule.h" //required for correct implementation
51 #include "vtkPolyDataAlgorithm.h"
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]) { this->SetNumberOfDivisions(div[0], div[1], div[2]); }
77  void SetNumberOfDivisions(int div0, int div1, int div2);
78 
79  const int* GetNumberOfDivisions();
80  void GetNumberOfDivisions(int div[3]);
81 
82 protected:
84  ~vtkmLevelOfDetail() override;
85 
87 
88 private:
89  int NumberOfDivisions[3];
90 
91  vtkmLevelOfDetail(const vtkmLevelOfDetail&) = delete;
92  void operator=(const vtkmLevelOfDetail&) = delete;
93 };
94 
95 #endif // vtkmLevelOfDetail_h
96 // VTK-HeaderTest-Exclude: vtkmLevelOfDetail.h
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkmLevelOfDetail
reduce the number of triangles in a mesh
Definition: vtkmLevelOfDetail.h:53
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkmLevelOfDetail::SetNumberOfDivisions
void SetNumberOfDivisions(int div[3])
Definition: vtkmLevelOfDetail.h:76
vtkPolyDataAlgorithm.h
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41