Go to the documentation of this file.
11 #ifndef vtk_m_VecAxisAlignedPointCoordinates_h
12 #define vtk_m_VecAxisAlignedPointCoordinates_h
29 template <vtkm::IdComponent NumDimensions>
30 struct VecAxisAlignedPointCoordinatesNumComponents;
33 struct VecAxisAlignedPointCoordinatesNumComponents<1>
39 struct VecAxisAlignedPointCoordinatesNumComponents<2>
45 struct VecAxisAlignedPointCoordinatesNumComponents<3>
50 struct VecAxisAlignedPointCoordinatesOffsetTable
55 { 0.0f, 0.0f, 0.0f }, { 1.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 0.0f }, { 0.0f, 1.0f, 0.0f },
56 { 0.0f, 0.0f, 1.0f }, { 1.0f, 0.0f, 1.0f }, { 1.0f, 1.0f, 1.0f }, { 0.0f, 1.0f, 1.0f }
58 return offsetTable[i][j];
77 template <vtkm::IdComponent NumDimensions>
84 detail::VecAxisAlignedPointCoordinatesNumComponents<NumDimensions>::NUM_COMPONENTS;
97 template <vtkm::IdComponent DestSize>
103 dest[index] = (*this)[index];
110 detail::VecAxisAlignedPointCoordinatesOffsetTable table;
112 this->Origin[1] + table.Get(index, 1) * this->Spacing[1],
113 this->Origin[2] + table.Get(index, 2) * this->Spacing[2]);
130 template <vtkm::IdComponent NumDimensions>
144 template <vtkm::IdComponent NumDimensions>
162 return vector[componentIndex];
167 template <
typename NewComponentType>
169 template <
typename NewComponentType>
172 template <vtkm::IdComponent destSize>
181 template <vtkm::IdComponent NumDimensions>
183 std::ostream& stream,
189 stream << vec[component] <<
",";
196 #endif //vtk_m_VecAxisAlignedPointCoordinates_h
An implicit vector for point coordinates in axis aligned cells.
Definition: VecAxisAlignedPointCoordinates.h:78
A tag for vectors that are "true" vectors (i.e.
Definition: VecTraits.h:21
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::Vec3f ComponentType
Definition: VecAxisAlignedPointCoordinates.h:81
The TypeTraits class provides helpful compile-time information about the basic types used in VTKm (an...
Definition: TypeTraits.h:61
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT auto Get(const vtkm::Tuple< Ts... > &tuple) -> decltype(tuple.template Get< Index >())
Retrieve the object from a vtkm::Tuple at the given index.
Definition: Tuple.h:83
vtkm::Int32 IdComponent
Represents a component ID (index of component in a vector).
Definition: Types.h:168
#define VTKM_STATIC_CONSTEXPR_ARRAY
Definition: ExportMacros.h:107
static VTKM_EXEC_CONT vtkm::VecAxisAlignedPointCoordinates< NumDimensions > ZeroInitialization()
Definition: VecAxisAlignedPointCoordinates.h:137
ComponentType Spacing
Definition: VecAxisAlignedPointCoordinates.h:127
VTKM_EXEC_CONT VecAxisAlignedPointCoordinates(ComponentType origin=ComponentType(0, 0, 0), ComponentType spacing=ComponentType(1, 1, 1))
Definition: VecAxisAlignedPointCoordinates.h:87
ComponentType Origin
Definition: VecAxisAlignedPointCoordinates.h:124
Tag used to identify types that store real (floating-point) numbers.
Definition: TypeTraits.h:28
static VTKM_EXEC_CONT vtkm::IdComponent GetNumberOfComponents(const VecType &)
Definition: VecAxisAlignedPointCoordinates.h:157
VTKM_EXEC_CONT ComponentType operator[](vtkm::IdComponent index) const
Definition: VecAxisAlignedPointCoordinates.h:108
VTKM_CONT std::ostream & operator<<(std::ostream &stream, const vtkm::Bounds &bounds)
Helper function for printing bounds during testing.
Definition: Bounds.h:237
static VTKM_EXEC_CONT void CopyInto(const VecType &src, vtkm::Vec< ComponentType, destSize > &dest)
Definition: VecAxisAlignedPointCoordinates.h:173
#define VTKM_CONT
Definition: ExportMacros.h:57
static VTKM_EXEC_CONT ComponentType GetComponent(const VecType &vector, vtkm::IdComponent componentIndex)
Definition: VecAxisAlignedPointCoordinates.h:160
vtkm::Vec< vtkm::FloatDefault, 3 > Vec3f
Vec3f corresponds to a 3-dimensional vector of floating point values.
Definition: Types.h:1014
const VTKM_EXEC_CONT ComponentType & GetOrigin() const
Definition: VecAxisAlignedPointCoordinates.h:117
VTKM_EXEC_CONT void CopyInto(vtkm::Vec< ComponentType, DestSize > &dest) const
Definition: VecAxisAlignedPointCoordinates.h:98
Tag used to identify 1 dimensional types (vectors).
Definition: TypeTraits.h:51
vtkm::Float32 FloatDefault
The floating point type to use when no other precision is specified.
Definition: Types.h:198
VTKM_EXEC_CONT vtkm::IdComponent GetNumberOfComponents() const
Definition: VecAxisAlignedPointCoordinates.h:95
vtkm::FloatDefault BaseComponentType
Definition: VecAxisAlignedPointCoordinates.h:150
int32_t Int32
Definition: Types.h:160
static constexpr vtkm::IdComponent NUM_COMPONENTS
Definition: VecAxisAlignedPointCoordinates.h:83
The VecTraits class gives several static members that define how to use a given type as a vector.
Definition: VecTraits.h:66
const VTKM_EXEC_CONT ComponentType & GetSpacing() const
Definition: VecAxisAlignedPointCoordinates.h:120
static constexpr vtkm::IdComponent NUM_COMPONENTS
Number of components in the vector.
Definition: VecTraits.h:86