Go to the documentation of this file.
19 #ifndef viskores_VecAxisAlignedPointCoordinates_h
20 #define viskores_VecAxisAlignedPointCoordinates_h
37 template <viskores::IdComponent NumDimensions>
38 struct VecAxisAlignedPointCoordinatesNumComponents;
41 struct VecAxisAlignedPointCoordinatesNumComponents<1>
47 struct VecAxisAlignedPointCoordinatesNumComponents<2>
53 struct VecAxisAlignedPointCoordinatesNumComponents<3>
58 struct VecAxisAlignedPointCoordinatesOffsetTable
63 { 0.0f, 0.0f, 0.0f }, { 1.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 0.0f }, { 0.0f, 1.0f, 0.0f },
64 { 0.0f, 0.0f, 1.0f }, { 1.0f, 0.0f, 1.0f }, { 1.0f, 1.0f, 1.0f }, { 0.0f, 1.0f, 1.0f }
66 return offsetTable[i][j];
85 template <viskores::IdComponent NumDimensions>
92 detail::VecAxisAlignedPointCoordinatesNumComponents<NumDimensions>::NUM_COMPONENTS;
105 template <viskores::IdComponent DestSize>
111 dest[index] = (*this)[index];
118 detail::VecAxisAlignedPointCoordinatesOffsetTable table;
120 this->Origin[1] + table.Get(index, 1) * this->Spacing[1],
121 this->Origin[2] + table.Get(index, 2) * this->Spacing[2]);
138 template <viskores::IdComponent NumDimensions>
152 template <viskores::IdComponent NumDimensions>
170 return vector[componentIndex];
175 template <
typename NewComponentType>
177 template <
typename NewComponentType>
181 template <viskores::IdComponent destSize>
191 template <viskores::IdComponent NumDimensions>
193 std::ostream& stream,
199 stream << vec[component] <<
",";
206 #endif //viskores_VecAxisAlignedPointCoordinates_h
const ComponentType & GetSpacing() const
Definition: VecAxisAlignedPointCoordinates.h:128
static constexpr viskores::IdComponent NUM_COMPONENTS
Definition: VecAxisAlignedPointCoordinates.h:91
ComponentType operator[](viskores::IdComponent index) const
Definition: VecAxisAlignedPointCoordinates.h:116
An implicit vector for point coordinates in axis aligned cells.
Definition: VecAxisAlignedPointCoordinates.h:86
static viskores::IdComponent GetNumberOfComponents(const VecType &)
Definition: VecAxisAlignedPointCoordinates.h:165
A tag for vectors that are "true" vectors (i.e.
Definition: VecTraits.h:31
viskores::Vec3f ComponentType
Definition: VecAxisAlignedPointCoordinates.h:89
static void CopyInto(const VecType &src, viskores::Vec< ComponentType, destSize > &dest)
Definition: VecAxisAlignedPointCoordinates.h:182
viskores::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:202
ComponentType Spacing
Definition: VecAxisAlignedPointCoordinates.h:135
#define VISKORES_EXEC_CONT
Definition: ExportMacros.h:60
The TypeTraits class provides helpful compile-time information about the basic types used in Viskores...
Definition: TypeTraits.h:69
#define VISKORES_CONT
Definition: ExportMacros.h:65
std::ostream & operator<<(std::ostream &stream, const viskores::Bounds &bounds)
Helper function for printing bounds during testing.
Definition: Bounds.h:268
Groups connected points that have the same field value.
Definition: Atomic.h:27
Tag used to identify types that store real (floating-point) numbers.
Definition: TypeTraits.h:36
static constexpr viskores::IdComponent NUM_COMPONENTS
Number of components in the vector.
Definition: VecTraits.h:93
Traits that can be queried to treat any type as a Vec.
Definition: VecTraits.h:69
const ComponentType & GetOrigin() const
Definition: VecAxisAlignedPointCoordinates.h:125
#define VISKORES_STATIC_CONSTEXPR_ARRAY
Definition: ExportMacros.h:115
static ComponentType GetComponent(const VecType &vector, viskores::IdComponent componentIndex)
Definition: VecAxisAlignedPointCoordinates.h:168
int32_t Int32
Base type to use for 32-bit signed integer numbers.
Definition: Types.h:189
ComponentType Origin
Definition: VecAxisAlignedPointCoordinates.h:132
VecAxisAlignedPointCoordinates(ComponentType origin=ComponentType(0, 0, 0), ComponentType spacing=ComponentType(1, 1, 1))
Definition: VecAxisAlignedPointCoordinates.h:95
viskores::Float32 FloatDefault
The floating point type to use when no other precision is specified.
Definition: Types.h:244
auto Get(const viskores::Tuple< Ts... > &tuple)
Retrieve the object from a viskores::Tuple at the given index.
Definition: Tuple.h:89
static viskores::VecAxisAlignedPointCoordinates< NumDimensions > ZeroInitialization()
Definition: VecAxisAlignedPointCoordinates.h:145
viskores::FloatDefault BaseComponentType
Definition: VecAxisAlignedPointCoordinates.h:158
Tag used to identify 1 dimensional types (vectors).
Definition: TypeTraits.h:59
viskores::Vec< viskores::FloatDefault, 3 > Vec3f
Vec3f corresponds to a 3-dimensional vector of floating point values.
Definition: Types.h:1064
void CopyInto(viskores::Vec< ComponentType, DestSize > &dest) const
Definition: VecAxisAlignedPointCoordinates.h:106
viskores::IdComponent GetNumberOfComponents() const
Definition: VecAxisAlignedPointCoordinates.h:103