Go to the documentation of this file.
18 #ifndef viskores_RangeId3_h
19 #define viskores_RangeId3_h
103 return (this->X.
IsNonEmpty() && this->Y.IsNonEmpty() && this->Z.IsNonEmpty());
111 return (this->X.
Contains(val[0]) && this->Y.Contains(val[1]) && this->Z.Contains(val[2]));
136 template <
typename T>
166 return unionRangeId3;
177 return ((this->X == range.
X) && (this->Y == range.
Y) && (this->Z == range.
Z));
183 return ((this->X != range.
X) || (this->Y != range.
Y) || (this->Z != range.
Z));
224 return stream <<
"{ X:" << range.
X <<
", Y:" << range.
Y <<
", Z:" << range.
Z <<
" }";
228 #endif //viskores_RangeId3_h
RangeId3(const viskores::Id range[6])
Initialize range with an array of 6 values in the order xmin, xmax, ymin, ymax, zmin,...
Definition: RangeId3.h:79
bool IsNonEmpty() const
Determine if the range is valid.
Definition: RangeId.h:67
RangeId3(viskores::Id minX, viskores::Id maxX, viskores::Id minY, viskores::Id maxY, viskores::Id minZ, viskores::Id maxZ)
Construct a range with the given minimum (inclusive) and maximum (exclusive) points.
Definition: RangeId3.h:63
bool Contains(viskores::Id value) const
Determines if a value is within the range.
Definition: RangeId.h:75
void Include(const viskores::Vec< T, 3 > &point)
Expand range to include a value.
Definition: RangeId3.h:137
viskores::RangeId X
The range of values in the X direction.
Definition: RangeId3.h:39
viskores::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:202
viskores::RangeId & operator[](IdComponent c) noexcept
Definition: RangeId3.h:186
bool operator!=(const viskores::RangeId3 &range) const
Definition: RangeId3.h:181
#define VISKORES_EXEC_CONT
Definition: ExportMacros.h:60
viskores::RangeId3 Union(const viskores::RangeId3 &other) const
Return the union of this and another range.
Definition: RangeId3.h:162
viskores::RangeId Z
The range of values in the Z direction.
Definition: RangeId3.h:45
viskores::Int64 Id
Base type to use to index arrays.
Definition: Types.h:235
#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
const viskores::RangeId & operator[](IdComponent c) const noexcept
Definition: RangeId3.h:203
viskores::Id3 Center() const
Returns the center of the range.
Definition: RangeId3.h:119
void Include(viskores::Id value)
Expand range to include a value.
Definition: RangeId.h:99
viskores::Vec< viskores::Id, 3 > Id3
Id3 corresponds to a 3-dimensional index for 3d arrays.
Definition: Types.h:1053
viskores::Id Center() const
Returns the center of the range.
Definition: RangeId.h:90
void Include(const viskores::RangeId3 &range)
Expand range to include other range.
Definition: RangeId3.h:150
bool IsNonEmpty() const
Determine if the range is non-empty.
Definition: RangeId3.h:101
Represent 3D integer range.
Definition: RangeId3.h:35
RangeId3(const viskores::RangeId &xrange, const viskores::RangeId &yrange, const viskores::RangeId &zrange)
Construct a range with the given x, y, and z directions.
Definition: RangeId3.h:52
viskores::Id3 Dimensions() const
Definition: RangeId3.h:125
bool operator==(const viskores::RangeId3 &range) const
Definition: RangeId3.h:175
bool Contains(const viskores::Id3 &val) const
Determines if an Id3 value is within the range.
Definition: RangeId3.h:109
Represent a range of viskores::Id values.
Definition: RangeId.h:36
RangeId3(const viskores::Id3 &min, const viskores::Id3 &max)
Initialize range with the minimum and the maximum corners.
Definition: RangeId3.h:89
viskores::RangeId3 operator+(const viskores::RangeId3 &other) const
Operator for union
Definition: RangeId3.h:172
viskores::Id Length() const
Returns the length of the range.
Definition: RangeId.h:83
RangeId3()=default
Construct an empty 3D range.
viskores::RangeId Y
The range of values in the Y direction.
Definition: RangeId3.h:42