Go to the documentation of this file.
10 #ifndef vtk_m_RangeId3_h
11 #define vtk_m_RangeId3_h
88 return (this->X.
IsNonEmpty() && this->Y.IsNonEmpty() && this->Z.IsNonEmpty());
96 return (this->X.
Contains(val[0]) && this->Y.Contains(val[1]) && this->Z.Contains(val[2]));
106 return vtkm::Id3(this->X.
Center(), this->Y.Center(), this->Z.Center());
112 return vtkm::Id3(this->X.
Length(), this->Y.Length(), this->Z.Length());
121 template <
typename T>
151 return unionRangeId3;
162 return ((this->X == range.
X) && (this->Y == range.
Y) && (this->Z == range.
Z));
168 return ((this->X != range.
X) || (this->Y != range.
Y) || (this->Z != range.
Z));
209 return stream <<
"{ X:" << range.
X <<
", Y:" << range.
Y <<
", Z:" << range.
Z <<
" }";
213 #endif //vtk_m_RangeId3_h
RangeId3(const vtkm::Id range[6])
Initialize range with an array of 6 values in the order xmin, xmax, ymin, ymax, zmin,...
Definition: RangeId3.h:64
bool IsNonEmpty() const
Determine if the range is valid.
Definition: RangeId.h:59
vtkm::RangeId X
The range of values in the X direction.
Definition: RangeId3.h:31
RangeId3(const vtkm::Id3 &min, const vtkm::Id3 &max)
Initialize range with the minimum and the maximum corners.
Definition: RangeId3.h:74
void Include(const vtkm::Vec< T, 3 > &point)
Expand range to include a value.
Definition: RangeId3.h:122
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::RangeId3 operator+(const vtkm::RangeId3 &other) const
Operator for union
Definition: RangeId3.h:157
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
vtkm::RangeId Y
The range of values in the Y direction.
Definition: RangeId3.h:34
vtkm::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:194
vtkm::RangeId3 Union(const vtkm::RangeId3 &other) const
Return the union of this and another range.
Definition: RangeId3.h:147
vtkm::Id3 Dimensions() const
Definition: RangeId3.h:110
vtkm::Id Center() const
Returns the center of the range.
Definition: RangeId.h:82
std::ostream & operator<<(std::ostream &stream, const vtkm::Bounds &bounds)
Helper function for printing bounds during testing.
Definition: Bounds.h:248
Represent a range of vtkm::Id values.
Definition: RangeId.h:28
void Include(vtkm::Id value)
Expand range to include a value.
Definition: RangeId.h:91
bool Contains(vtkm::Id value) const
Determines if a value is within the range.
Definition: RangeId.h:67
RangeId3()=default
Construct an empty 3D range.
void Include(const vtkm::RangeId3 &range)
Expand range to include other range.
Definition: RangeId3.h:135
vtkm::RangeId Z
The range of values in the Z direction.
Definition: RangeId3.h:37
vtkm::RangeId & operator[](IdComponent c) noexcept
Definition: RangeId3.h:171
RangeId3(const vtkm::RangeId &xrange, const vtkm::RangeId &yrange, const vtkm::RangeId &zrange)
Construct a range with the given x, y, and z directions.
Definition: RangeId3.h:44
bool operator!=(const vtkm::RangeId3 &range) const
Definition: RangeId3.h:166
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
bool IsNonEmpty() const
Determine if the range is non-empty.
Definition: RangeId3.h:86
vtkm::Vec< vtkm::Id, 3 > Id3
Id3 corresponds to a 3-dimensional index for 3d arrays.
Definition: Types.h:1044
vtkm::Id Length() const
Returns the length of the range.
Definition: RangeId.h:75
bool Contains(const vtkm::Id3 &val) const
Determines if an Id3 value is within the range.
Definition: RangeId3.h:94
Represent 3D integer range.
Definition: RangeId3.h:27
bool operator==(const vtkm::RangeId3 &range) const
Definition: RangeId3.h:160
RangeId3(vtkm::Id minX, vtkm::Id maxX, vtkm::Id minY, vtkm::Id maxY, vtkm::Id minZ, vtkm::Id maxZ)
Construct a range with the given minimum (inclusive) and maximum (exclusive) points.
Definition: RangeId3.h:53
vtkm::Id3 Center() const
Returns the center of the range.
Definition: RangeId3.h:104
const vtkm::RangeId & operator[](IdComponent c) const noexcept
Definition: RangeId3.h:188