Viskores  1.0
Tangle.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 //
14 // This software is distributed WITHOUT ANY WARRANTY; without even
15 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 // PURPOSE. See the above copyright notice for more information.
17 //============================================================================
18 
19 #ifndef viskores_source_Tangle_h
20 #define viskores_source_Tangle_h
21 
22 #include <viskores/source/Source.h>
23 
24 namespace viskores
25 {
26 namespace source
27 {
43 class VISKORES_SOURCE_EXPORT Tangle final : public viskores::source::Source
44 {
45 public:
46  VISKORES_CONT Tangle() = default;
47  VISKORES_CONT ~Tangle() = default;
48 
49  VISKORES_DEPRECATED(2.0, "Use SetCellDimensions or SetPointDimensions.")
51  : PointDimensions(dims + viskores::Id3(1))
52  {
53  }
54 
55  VISKORES_CONT viskores::Id3 GetPointDimensions() const { return this->PointDimensions; }
56  VISKORES_CONT void SetPointDimensions(viskores::Id3 dims) { this->PointDimensions = dims; }
57 
59  {
60  return this->PointDimensions - viskores::Id3(1);
61  }
63  {
64  this->PointDimensions = dims + viskores::Id3(1);
65  }
66 
67 private:
68  viskores::cont::DataSet DoExecute() const override;
69 
70  viskores::Id3 PointDimensions = { 16, 16, 16 };
71 };
72 } //namespace source
73 } //namespace viskores
74 
75 #endif //viskores_source_Tangle_h
viskores::cont::DataSet
Contains and manages the geometric data structures that Viskores operates on.
Definition: DataSet.h:66
viskores::source::Tangle::SetPointDimensions
void SetPointDimensions(viskores::Id3 dims)
Definition: Tangle.h:56
viskores::source::Tangle
The Tangle source creates a uniform dataset.
Definition: Tangle.h:43
Source.h
viskores::source::Source
Definition: Source.h:31
VISKORES_CONT
#define VISKORES_CONT
Definition: ExportMacros.h:65
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::source::Tangle::SetCellDimensions
void SetCellDimensions(viskores::Id3 dims)
Definition: Tangle.h:62
viskores::source::Tangle::GetCellDimensions
viskores::Id3 GetCellDimensions() const
Definition: Tangle.h:58
VISKORES_DEPRECATED
#define VISKORES_DEPRECATED(...)
Definition: Deprecated.h:156
viskores::Id3
viskores::Vec< viskores::Id, 3 > Id3
Id3 corresponds to a 3-dimensional index for 3d arrays.
Definition: Types.h:1053
viskores::source::Tangle::GetPointDimensions
viskores::Id3 GetPointDimensions() const
Definition: Tangle.h:55
viskores::Vec< viskores::Id, 3 >