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:23
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
auto Get(const vtkm::Tuple< Ts... > &tuple)
Retrieve the object from a vtkm::Tuple at the given index.
Definition: Tuple.h:81
static vtkm::VecAxisAlignedPointCoordinates< NumDimensions > ZeroInitialization()
Definition: VecAxisAlignedPointCoordinates.h:137
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
vtkm::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:194
#define VTKM_STATIC_CONSTEXPR_ARRAY
Definition: ExportMacros.h:107
static constexpr vtkm::IdComponent NUM_COMPONENTS
Number of components in the vector.
Definition: VecTraits.h:85
std::ostream & operator<<(std::ostream &stream, const vtkm::Bounds &bounds)
Helper function for printing bounds during testing.
Definition: Bounds.h:248
ComponentType Spacing
Definition: VecAxisAlignedPointCoordinates.h:127
ComponentType Origin
Definition: VecAxisAlignedPointCoordinates.h:124
ComponentType operator[](vtkm::IdComponent index) const
Definition: VecAxisAlignedPointCoordinates.h:108
Tag used to identify types that store real (floating-point) numbers.
Definition: TypeTraits.h:28
void CopyInto(vtkm::Vec< ComponentType, DestSize > &dest) const
Definition: VecAxisAlignedPointCoordinates.h:98
static vtkm::IdComponent GetNumberOfComponents(const VecType &)
Definition: VecAxisAlignedPointCoordinates.h:157
static void CopyInto(const VecType &src, vtkm::Vec< ComponentType, destSize > &dest)
Definition: VecAxisAlignedPointCoordinates.h:173
#define VTKM_CONT
Definition: ExportMacros.h:57
const ComponentType & GetSpacing() const
Definition: VecAxisAlignedPointCoordinates.h:120
const ComponentType & GetOrigin() const
Definition: VecAxisAlignedPointCoordinates.h:117
vtkm::Vec< vtkm::FloatDefault, 3 > Vec3f
Vec3f corresponds to a 3-dimensional vector of floating point values.
Definition: Types.h:1052
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:236
static ComponentType GetComponent(const VecType &vector, vtkm::IdComponent componentIndex)
Definition: VecAxisAlignedPointCoordinates.h:160
vtkm::FloatDefault BaseComponentType
Definition: VecAxisAlignedPointCoordinates.h:150
int32_t Int32
Base type to use for 32-bit signed integer numbers.
Definition: Types.h:181
static constexpr vtkm::IdComponent NUM_COMPONENTS
Definition: VecAxisAlignedPointCoordinates.h:83
Traits that can be queried to treat any type as a Vec.
Definition: VecTraits.h:61
vtkm::IdComponent GetNumberOfComponents() const
Definition: VecAxisAlignedPointCoordinates.h:95
VecAxisAlignedPointCoordinates(ComponentType origin=ComponentType(0, 0, 0), ComponentType spacing=ComponentType(1, 1, 1))
Definition: VecAxisAlignedPointCoordinates.h:87