VTK-m  2.0
Tangle.h
Go to the documentation of this file.
1 //============================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //============================================================================
10 
11 #ifndef vtk_m_source_Tangle_h
12 #define vtk_m_source_Tangle_h
13 
14 #include <vtkm/source/Source.h>
15 
16 namespace vtkm
17 {
18 namespace source
19 {
35 class VTKM_SOURCE_EXPORT Tangle final : public vtkm::source::Source
36 {
37 public:
38  VTKM_CONT Tangle() = default;
39  VTKM_CONT ~Tangle() = default;
40 
41  VTKM_DEPRECATED(2.0, "Use SetCellDimensions or SetPointDimensions.")
43  : PointDimensions(dims + vtkm::Id3(1))
44  {
45  }
46 
47  VTKM_CONT vtkm::Id3 GetPointDimensions() const { return this->PointDimensions; }
48  VTKM_CONT void SetPointDimensions(vtkm::Id3 dims) { this->PointDimensions = dims; }
49 
50  VTKM_CONT vtkm::Id3 GetCellDimensions() const { return this->PointDimensions - vtkm::Id3(1); }
51  VTKM_CONT void SetCellDimensions(vtkm::Id3 dims) { this->PointDimensions = dims + vtkm::Id3(1); }
52 
53 private:
54  vtkm::cont::DataSet DoExecute() const override;
55 
56  vtkm::Id3 PointDimensions = { 16, 16, 16 };
57 };
58 } //namespace source
59 } //namespace vtkm
60 
61 #endif //vtk_m_source_Tangle_h
vtkm::source::Tangle
The Tangle source creates a uniform dataset.
Definition: Tangle.h:35
vtkm::source::Tangle::GetPointDimensions
VTKM_CONT vtkm::Id3 GetPointDimensions() const
Definition: Tangle.h:47
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::source::Source
Definition: Source.h:23
vtkm::source::Tangle::SetPointDimensions
VTKM_CONT void SetPointDimensions(vtkm::Id3 dims)
Definition: Tangle.h:48
vtkm::source::Tangle::SetCellDimensions
VTKM_CONT void SetCellDimensions(vtkm::Id3 dims)
Definition: Tangle.h:51
vtkm::cont::DataSet
Definition: DataSet.h:34
Source.h
vtkm::source::Tangle::GetCellDimensions
VTKM_CONT vtkm::Id3 GetCellDimensions() const
Definition: Tangle.h:50
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::Id3
vtkm::Vec< vtkm::Id, 3 > Id3
Id3 corresponds to a 3-dimensional index for 3d arrays.
Definition: Types.h:1003
vtkm::Vec< vtkm::Id, 3 >
VTKM_DEPRECATED
#define VTKM_DEPRECATED(...)
Definition: Deprecated.h:145