Viskores  1.0
Oscillator.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 #ifndef viskores_source_OscillatorSource_h
19 #define viskores_source_OscillatorSource_h
20 
21 #include <viskores/source/Source.h>
22 
23 namespace viskores
24 {
25 namespace source
26 {
27 
36 class VISKORES_SOURCE_EXPORT Oscillator final : public viskores::source::Source
37 {
38 public:
40 
43  2.0,
44  "Use SetCellDimensions or SetPointDimensions.") explicit Oscillator(viskores::Id3 dims);
45 
46  // We can not declare default destructor here since compiler does not know how
47  // to create one for the Worklet at this point yet. However, the implementation
48  // in Oscillator.cxx does have ~Oscillator() = default;
49  VISKORES_CONT ~Oscillator() override;
50 
51  VISKORES_CONT void SetPointDimensions(viskores::Id3 pointDimensions);
52  VISKORES_CONT viskores::Id3 GetPointDimensions() const;
53  VISKORES_CONT void SetCellDimensions(viskores::Id3 pointDimensions);
54  VISKORES_CONT viskores::Id3 GetCellDimensions() const;
55 
57  void SetTime(viskores::FloatDefault time);
58 
60  void AddPeriodic(viskores::FloatDefault x,
66 
68  void AddDamped(viskores::FloatDefault x,
74 
76  void AddDecaying(viskores::FloatDefault x,
82 
83 private:
84  VISKORES_CONT viskores::cont::DataSet DoExecute() const override;
85 
86  struct InternalStruct;
87  std::unique_ptr<InternalStruct> Internals;
88 };
89 }
90 }
91 
92 #endif // viskores_source_OscillatorSource_h
viskores::source::Oscillator::Internals
std::unique_ptr< InternalStruct > Internals
Definition: Oscillator.h:86
viskores::cont::DataSet
Contains and manages the geometric data structures that Viskores operates on.
Definition: DataSet.h:66
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_DEPRECATED
#define VISKORES_DEPRECATED(...)
Definition: Deprecated.h:156
viskores::source::Oscillator
An analytical, time-varying uniform dataset with a point based array.
Definition: Oscillator.h:36
viskores::FloatDefault
viskores::Float32 FloatDefault
The floating point type to use when no other precision is specified.
Definition: Types.h:244
viskores::Vec< viskores::Id, 3 >