VTK-m  2.0
StreamSurface.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_filter_flow_StreamSurface_h
12 #define vtk_m_filter_flow_StreamSurface_h
13 
16 #include <vtkm/filter/flow/vtkm_filter_flow_export.h>
17 
18 namespace vtkm
19 {
20 namespace filter
21 {
22 namespace flow
23 {
24 
26 
29 
30 class VTKM_FILTER_FLOW_EXPORT StreamSurface : public vtkm::filter::FilterField
31 {
32 public:
33  VTKM_CONT
34  void SetStepSize(vtkm::FloatDefault s) { this->StepSize = s; }
35 
36  VTKM_CONT
37  void SetNumberOfSteps(vtkm::Id n) { this->NumberOfSteps = n; }
38 
39  template <typename ParticleType>
41  {
42  this->Seeds = seeds;
43  }
44 
45  template <typename ParticleType>
46  VTKM_CONT void SetSeeds(const std::vector<ParticleType>& seeds,
48  {
49  this->Seeds = vtkm::cont::make_ArrayHandle(seeds, copyFlag);
50  }
51 
52 private:
53  VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& inData) override;
54 
55  vtkm::Id NumberOfSteps = 0;
57  vtkm::FloatDefault StepSize = 0;
58 };
59 
60 }
61 }
62 } // namespace vtkm::filter::flow
63 
64 #endif // vtk_m_filter_flow_StreamSurface_h
vtkm::cont::make_ArrayHandle
VTKM_CONT vtkm::cont::ArrayHandleBasic< T > make_ArrayHandle(const T *array, vtkm::Id numberOfValues, vtkm::CopyFlag copy)
A convenience function for creating an ArrayHandle from a standard C array.
Definition: ArrayHandleBasic.h:217
vtkm::cont::ArrayHandle< ParticleType >
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::filter::flow::StreamSurface
generate streamlines from a vector field.
Definition: StreamSurface.h:30
vtkm::filter::flow::StreamSurface::SetSeeds
VTKM_CONT void SetSeeds(vtkm::cont::ArrayHandle< ParticleType > &seeds)
Definition: StreamSurface.h:40
vtkm::cont::UnknownArrayHandle
An ArrayHandle of an unknown value type and storage.
Definition: UnknownArrayHandle.h:406
vtkm::cont::DataSet
Definition: DataSet.h:34
vtkm::Id
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
FilterField.h
vtkm::filter::FilterField
Definition: FilterField.h:21
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::CopyFlag::On
@ On
vtkm::FloatDefault
vtkm::Float32 FloatDefault
The floating point type to use when no other precision is specified.
Definition: Types.h:198
vtkm::filter::flow::StreamSurface::Seeds
vtkm::cont::UnknownArrayHandle Seeds
Definition: StreamSurface.h:56
vtkm::CopyFlag
CopyFlag
Definition: Flags.h:16
FlowTypes.h
vtkm::filter::flow::StreamSurface::SetStepSize
VTKM_CONT void SetStepSize(vtkm::FloatDefault s)
Definition: StreamSurface.h:34
vtkm::filter::flow::StreamSurface::SetSeeds
VTKM_CONT void SetSeeds(const std::vector< ParticleType > &seeds, vtkm::CopyFlag copyFlag=vtkm::CopyFlag::On)
Definition: StreamSurface.h:46
vtkm::filter::flow::StreamSurface::SetNumberOfSteps
VTKM_CONT void SetNumberOfSteps(vtkm::Id n)
Definition: StreamSurface.h:37