2014-05-01 23:19:54 +00:00
|
|
|
//============================================================================
|
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
|
|
|
// This software is distributed WITHOUT ANY WARRANTY; without even
|
|
|
|
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
// PURPOSE. See the above copyright notice for more information.
|
|
|
|
//
|
2017-09-20 21:33:44 +00:00
|
|
|
// Copyright 2014 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
|
2014-05-01 23:19:54 +00:00
|
|
|
// Copyright 2014 UT-Battelle, LLC.
|
2015-05-21 12:09:22 +00:00
|
|
|
// Copyright 2014 Los Alamos National Security.
|
2014-05-01 23:19:54 +00:00
|
|
|
//
|
2017-09-20 21:33:44 +00:00
|
|
|
// Under the terms of Contract DE-NA0003525 with NTESS,
|
2014-05-01 23:19:54 +00:00
|
|
|
// the U.S. Government retains certain rights in this software.
|
|
|
|
//
|
|
|
|
// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
|
|
|
|
// Laboratory (LANL), the U.S. Government retains certain rights in
|
|
|
|
// this software.
|
|
|
|
//============================================================================
|
|
|
|
#ifndef vtk_m_cont_ArrayHandleUniformPointCoordinates_h
|
|
|
|
#define vtk_m_cont_ArrayHandleUniformPointCoordinates_h
|
|
|
|
|
|
|
|
#include <vtkm/cont/ArrayHandle.h>
|
2014-06-23 23:33:04 +00:00
|
|
|
#include <vtkm/cont/StorageImplicit.h>
|
2017-05-18 14:51:24 +00:00
|
|
|
#include <vtkm/internal/ArrayPortalUniformPointCoordinates.h>
|
2014-05-01 23:19:54 +00:00
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
namespace vtkm
|
|
|
|
{
|
|
|
|
namespace cont
|
|
|
|
{
|
2014-05-01 23:19:54 +00:00
|
|
|
|
|
|
|
/// ArrayHandleUniformPointCoordinates is a specialization of ArrayHandle. It
|
|
|
|
/// contains the information necessary to compute the point coordinates in a
|
|
|
|
/// uniform orthogonal grid (extent, origin, and spacing) and implicitly
|
|
|
|
/// computes these coordinates in its array portal.
|
|
|
|
///
|
|
|
|
class ArrayHandleUniformPointCoordinates
|
2017-05-18 14:29:41 +00:00
|
|
|
: public vtkm::cont::ArrayHandle<
|
|
|
|
vtkm::Vec<vtkm::FloatDefault, 3>,
|
|
|
|
vtkm::cont::StorageTagImplicit<vtkm::internal::ArrayPortalUniformPointCoordinates>>
|
2014-05-01 23:19:54 +00:00
|
|
|
{
|
2014-10-09 14:54:56 +00:00
|
|
|
public:
|
2015-10-21 19:36:27 +00:00
|
|
|
VTKM_ARRAY_HANDLE_SUBCLASS_NT(
|
2017-05-18 14:29:41 +00:00
|
|
|
ArrayHandleUniformPointCoordinates,
|
|
|
|
(vtkm::cont::ArrayHandle<
|
|
|
|
vtkm::Vec<vtkm::FloatDefault, 3>,
|
|
|
|
vtkm::cont::StorageTagImplicit<vtkm::internal::ArrayPortalUniformPointCoordinates>>));
|
2014-05-01 23:19:54 +00:00
|
|
|
|
2015-08-17 17:15:03 +00:00
|
|
|
private:
|
2017-08-16 15:34:21 +00:00
|
|
|
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
2015-08-17 17:15:03 +00:00
|
|
|
|
2014-05-01 23:19:54 +00:00
|
|
|
public:
|
2016-10-19 22:42:58 +00:00
|
|
|
VTKM_CONT
|
2017-05-18 14:29:41 +00:00
|
|
|
ArrayHandleUniformPointCoordinates(vtkm::Id3 dimensions,
|
|
|
|
ValueType origin = ValueType(0.0f, 0.0f, 0.0f),
|
|
|
|
ValueType spacing = ValueType(1.0f, 1.0f, 1.0f))
|
|
|
|
: Superclass(StorageType(
|
|
|
|
vtkm::internal::ArrayPortalUniformPointCoordinates(dimensions, origin, spacing)))
|
|
|
|
{
|
|
|
|
}
|
2014-05-01 23:19:54 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
} // namespace vtkm::cont
|
|
|
|
|
|
|
|
#endif //vtk_+m_cont_ArrayHandleUniformPointCoordinates_h
|