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.
|
|
|
|
//
|
|
|
|
// Copyright 2014 Sandia Corporation.
|
|
|
|
// 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
|
|
|
//
|
|
|
|
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
|
|
|
// 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
|
|
|
|
|
2015-08-17 17:15:03 +00:00
|
|
|
#include <vtkm/internal/ArrayPortalUniformPointCoordinates.h>
|
2014-05-01 23:19:54 +00:00
|
|
|
#include <vtkm/cont/ArrayHandle.h>
|
2014-06-23 23:33:04 +00:00
|
|
|
#include <vtkm/cont/StorageImplicit.h>
|
2014-05-01 23:19:54 +00:00
|
|
|
|
|
|
|
namespace vtkm {
|
|
|
|
namespace cont {
|
|
|
|
|
|
|
|
/// 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
|
|
|
|
: public vtkm::cont::ArrayHandle<
|
2014-10-09 14:54:56 +00:00
|
|
|
vtkm::Vec<vtkm::FloatDefault,3>,
|
2014-06-23 23:33:04 +00:00
|
|
|
vtkm::cont::StorageTagImplicit<
|
2015-08-17 17:15:03 +00:00
|
|
|
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(
|
|
|
|
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:
|
|
|
|
typedef vtkm::cont::internal::Storage<ValueType, StorageTag> StorageType;
|
|
|
|
|
2014-05-01 23:19:54 +00:00
|
|
|
public:
|
2016-10-19 22:42:58 +00:00
|
|
|
VTKM_CONT
|
2015-08-17 18:47:46 +00:00
|
|
|
ArrayHandleUniformPointCoordinates(
|
|
|
|
vtkm::Id3 dimensions,
|
|
|
|
ValueType origin = ValueType(0.0f, 0.0f, 0.0f),
|
|
|
|
ValueType spacing = ValueType(1.0f, 1.0f, 1.0f))
|
2014-05-01 23:19:54 +00:00
|
|
|
: Superclass(
|
2015-08-17 17:15:03 +00:00
|
|
|
StorageType(vtkm::internal::ArrayPortalUniformPointCoordinates(
|
|
|
|
dimensions, origin, spacing)))
|
2014-05-01 23:19:54 +00:00
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
} // namespace vtkm::cont
|
|
|
|
|
|
|
|
#endif //vtk_+m_cont_ArrayHandleUniformPointCoordinates_h
|