Viskores
1.0
|
Represent 3D integer range. More...
#include <RangeId3.h>
Public Member Functions | |
RangeId3 ()=default | |
Construct an empty 3D range. More... | |
RangeId3 (const viskores::RangeId &xrange, const viskores::RangeId &yrange, const viskores::RangeId &zrange) | |
Construct a range with the given x, y, and z directions. More... | |
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. More... | |
RangeId3 (const viskores::Id range[6]) | |
Initialize range with an array of 6 values in the order xmin, xmax, ymin, ymax, zmin, zmax. More... | |
RangeId3 (const viskores::Id3 &min, const viskores::Id3 &max) | |
Initialize range with the minimum and the maximum corners. More... | |
bool | IsNonEmpty () const |
Determine if the range is non-empty. More... | |
bool | Contains (const viskores::Id3 &val) const |
Determines if an Id3 value is within the range. More... | |
viskores::Id3 | Center () const |
Returns the center of the range. More... | |
viskores::Id3 | Dimensions () const |
template<typename T > | |
void | Include (const viskores::Vec< T, 3 > &point) |
Expand range to include a value. More... | |
void | Include (const viskores::RangeId3 &range) |
Expand range to include other range. More... | |
viskores::RangeId3 | Union (const viskores::RangeId3 &other) const |
Return the union of this and another range. More... | |
viskores::RangeId3 | operator+ (const viskores::RangeId3 &other) const |
Operator for union More... | |
bool | operator== (const viskores::RangeId3 &range) const |
bool | operator!= (const viskores::RangeId3 &range) const |
viskores::RangeId & | operator[] (IdComponent c) noexcept |
const viskores::RangeId & | operator[] (IdComponent c) const noexcept |
Public Attributes | |
viskores::RangeId | X |
The range of values in the X direction. More... | |
viskores::RangeId | Y |
The range of values in the Y direction. More... | |
viskores::RangeId | Z |
The range of values in the Z direction. More... | |
Represent 3D integer range.
viskores::RangeId3
is a helper class for representing a 3D range of integer values. The typical use of this class is to express a box of indices in the x, y, and z directions.
RangeId3
also contains several helper functions for computing and maintaining the range.
|
default |
Construct an empty 3D range.
|
inline |
Construct a range with the given x, y, and z directions.
|
inline |
Construct a range with the given minimum (inclusive) and maximum (exclusive) points.
|
inlineexplicit |
Initialize range with an array of 6 values in the order xmin, xmax, ymin, ymax, zmin, zmax.
|
inline |
Initialize range with the minimum and the maximum corners.
|
inline |
Returns the center of the range.
Center
computes the middle of the range.
|
inline |
Determines if an Id3 value is within the range.
|
inline |
|
inline |
Expand range to include other range.
This version of Include
expands the range just enough to include the other range. Essentially it is the union of the two ranges.
|
inline |
Expand range to include a value.
This version of Include
expands the range just enough to include the given value. If the range already include this value, then nothing is done.
|
inline |
Determine if the range is non-empty.
IsNonEmpty
returns true if the range is non-empty.
|
inline |
|
inline |
Operator for union
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
Return the union of this and another range.
This is a nondestructive form of Include
.
viskores::RangeId viskores::RangeId3::X |
The range of values in the X direction.
The viskores::RangeId
struct provides the minimum and maximum along that axis.
viskores::RangeId viskores::RangeId3::Y |
The range of values in the Y direction.
The viskores::RangeId
struct provides the minimum and maximum along that axis.
viskores::RangeId viskores::RangeId3::Z |
The range of values in the Z direction.
The viskores::RangeId
struct provides the minimum and maximum along that axis.