Viskores  1.0
PointLocatorBase.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_cont_internal_PointLocatorBase_h
19 #define viskores_cont_internal_PointLocatorBase_h
20 
22 
23 #include <viskores/Types.h>
26 
27 namespace viskores
28 {
29 namespace cont
30 {
31 
41 class VISKORES_CONT_EXPORT PointLocatorBase : public viskores::cont::ExecutionObjectBase
42 {
43 public:
44  virtual ~PointLocatorBase() = default;
45 
50  viskores::cont::CoordinateSystem GetCoordinates() const { return this->Coords; }
53  {
54  this->Coords = coords;
55  this->SetModified();
56  }
59  {
60  this->SetCoordinates({ "coords", coords });
61  }
62 
63  void Update() const;
64 
65 protected:
66  void SetModified() { this->Modified = true; }
67  bool GetModified() const { return this->Modified; }
68 
69  virtual void Build() = 0;
70 
71 private:
73  mutable bool Modified = true;
74 };
75 
76 } // viskores::cont
77 } // viskores
78 
79 #endif // viskores_cont_internal_PointLocatorBase_h
viskores::cont::PointLocatorBase::GetCoordinates
viskores::cont::CoordinateSystem GetCoordinates() const
Specify the CoordinateSystem defining the location of the cells.
Definition: PointLocatorBase.h:50
Types.h
viskores::cont::PointLocatorBase
Base class for all PointLocator classes.
Definition: PointLocatorBase.h:41
viskores::cont::CoordinateSystem
Manages a coordinate system for a DataSet.
Definition: CoordinateSystem.h:38
viskores::cont::PointLocatorBase::SetCoordinates
void SetCoordinates(const viskores::cont::UnknownArrayHandle &coords)
Specify the CoordinateSystem defining the location of the cells.
Definition: PointLocatorBase.h:58
viskores::cont::PointLocatorBase::SetCoordinates
void SetCoordinates(const viskores::cont::CoordinateSystem &coords)
Specify the CoordinateSystem defining the location of the cells.
Definition: PointLocatorBase.h:52
CoordinateSystem.h
VISKORES_CONT
#define VISKORES_CONT
Definition: ExportMacros.h:65
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::cont::PointLocatorBase::GetModified
bool GetModified() const
Definition: PointLocatorBase.h:67
viskores::cont::PointLocatorBase::Coords
viskores::cont::CoordinateSystem Coords
Definition: PointLocatorBase.h:72
viskores::cont::PointLocatorBase::SetModified
void SetModified()
Definition: PointLocatorBase.h:66
viskores::cont::UnknownArrayHandle
An ArrayHandle of an unknown value type and storage.
Definition: UnknownArrayHandle.h:451
ExecutionObjectBase.h
viskores::cont::ExecutionObjectBase
Base ExecutionObjectBase for execution objects to inherit from so that you can use an arbitrary objec...
Definition: ExecutionObjectBase.h:39
viskores_cont_export.h