Go to the documentation of this file.
   11 #ifndef vtk_m_Bounds_h 
   12 #define vtk_m_Bounds_h 
   59   template <
typename T1, 
typename T2, 
typename T3, 
typename T4, 
typename T5, 
typename T6>
 
  105     return (this->X.
IsNonEmpty() && this->Y.IsNonEmpty() && this->Z.IsNonEmpty());
 
  110   template <
typename T>
 
  113     return (this->X.
Contains(point[0]) && this->Y.Contains(point[1]) && this->Z.Contains(point[2]));
 
  126       return (this->X.
Length() * this->Y.Length() * this->Z.Length());
 
  144       return (this->X.
Length() * this->Y.Length());
 
  185   template <
typename T>
 
  214     unionBounds.
Include(otherBounds);
 
  236     return ((this->X == bounds.
X) && (this->Y == bounds.
Y) && (this->Z == bounds.
Z));
 
  242     return ((this->X != bounds.
X) || (this->Y != bounds.
Y) || (this->Z != bounds.
Z));
 
  250   return stream << 
"{ X:" << bounds.
X << 
", Y:" << bounds.
Y << 
", Z:" << bounds.
Z << 
" }";
 
  262     return NUM_COMPONENTS;
 
  322   template <
typename NewComponentType>
 
  324   template <
typename NewComponentType>
 
  328   template <vtkm::IdComponent destSize>
 
  332     const vtkm::IdComponent maxComponent = (destSize < NUM_COMPONENTS) ? destSize : NUM_COMPONENTS;
 
  335       dest[component] = GetComponent(src, component);
 
  342 #endif //vtk_m_Bounds_h 
  
Bounds(const vtkm::Vec< T, 3 > &minPoint, const vtkm::Vec< T, 3 > &maxPoint)
Initialize bounds with the minimum corner point and the maximum corner point.
Definition: Bounds.h:87
 
vtkm::Float64 Area() const
Returns the area of the bounds in the X-Y-plane.
Definition: Bounds.h:140
 
A tag for vectors that are "true" vectors (i.e.
Definition: VecTraits.h:23
 
bool Contains(const T &value) const
Determines if a value is within the range.
Definition: Range.h:79
 
Groups connected points that have the same field value.
Definition: Atomic.h:19
 
static void CopyInto(const vtkm::Bounds &src, vtkm::Vec< ComponentType, destSize > &dest)
Definition: Bounds.h:329
 
bool operator!=(const vtkm::Bounds &bounds) const
Definition: Bounds.h:240
 
#define VTKM_ASSERT(condition)
Definition: Assert.h:43
 
bool IsNonEmpty() const
Determine if the bounds are valid (i.e.
Definition: Bounds.h:103
 
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
 
vtkm::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:194
 
vtkm::Float64 Length() const
Returns the length of the range.
Definition: Range.h:91
 
std::ostream & operator<<(std::ostream &stream, const vtkm::Bounds &bounds)
Helper function for printing bounds during testing.
Definition: Bounds.h:248
 
void Include(const vtkm::Bounds &bounds)
Expand bounds to include other bounds.
Definition: Bounds.h:199
 
vtkm::Bounds operator+(const vtkm::Bounds &otherBounds) const
Operator for union
Definition: Bounds.h:231
 
vtkm::Float64 Center() const
Returns the center of the range.
Definition: Range.h:109
 
static constexpr vtkm::IdComponent GetNumberOfComponents(const vtkm::Bounds &)
Definition: Bounds.h:260
 
vtkm::Bounds Intersection(const vtkm::Bounds &otherBounds) const
Return the intersection of this and another range.
Definition: Bounds.h:221
 
static const ComponentType & GetComponent(const vtkm::Bounds &bounds, vtkm::IdComponent component)
Definition: Bounds.h:268
 
vtkm::Bounds Union(const vtkm::Bounds &otherBounds) const
Return the union of this and another bounds.
Definition: Bounds.h:211
 
Bounds()
Construct an empty bounds.
Definition: Bounds.h:44
 
Bounds(const vtkm::Range &xRange, const vtkm::Range &yRange, const vtkm::Range &zRange)
Construct a bounds with a given range in the x, y, and z dimensions.
Definition: Bounds.h:50
 
Bounds(const T bounds[6])
Initialize bounds with an array of 6 values in the order xmin, xmax, ymin, ymax, zmin,...
Definition: Bounds.h:76
 
vtkm::VecTraits< vtkm::Range >::BaseComponentType BaseComponentType
Definition: Bounds.h:257
 
vtkm::Vec< vtkm::Float64, 3 > Vec3f_64
Vec3f_64 corresponds to a 3-dimensional vector of 64-bit floating point values.
Definition: Types.h:1067
 
static void SetComponent(vtkm::Bounds &bounds, vtkm::IdComponent component, const ComponentType &value)
Definition: Bounds.h:303
 
vtkm::Vec3f_64 Center() const
Returns the center of the range.
Definition: Bounds.h:158
 
vtkm::Range Z
The range of values in the Z direction.
Definition: Bounds.h:39
 
bool Contains(const vtkm::Vec< T, 3 > &point) const
Determines if a point coordinate is within the bounds.
Definition: Bounds.h:111
 
#define VTKM_CONT
Definition: ExportMacros.h:57
 
Represent an axis-aligned 3D bounds in space.
Definition: Bounds.h:29
 
vtkm::Bounds & operator=(const vtkm::Bounds &src)=default
 
void Include(const T &value)
Expand range to include a value.
Definition: Range.h:128
 
vtkm::Float64 Volume() const
Returns the volume of the bounds.
Definition: Bounds.h:122
 
vtkm::Float64 Min
The minumum value of the range (inclusive).
Definition: Range.h:34
 
vtkm::Vec3f_64 MaxCorner() const
Returns the max point of the bounds
Definition: Bounds.h:177
 
double Float64
Base type to use for 64-bit floating-point numbers.
Definition: Types.h:161
 
vtkm::Range X
The range of values in the X direction.
Definition: Bounds.h:33
 
vtkm::Range Y
The range of values in the Y direction.
Definition: Bounds.h:36
 
#define VTKM_NEVER_EXPORT
Definition: ExportMacros.h:90
 
vtkm::Float64 Max
Tha maximum value of the range (inclusive).
Definition: Range.h:36
 
Traits that can be queried to treat any type as a Vec.
Definition: VecTraits.h:61
 
static ComponentType & GetComponent(vtkm::Bounds &bounds, vtkm::IdComponent component)
Definition: Bounds.h:285
 
void Include(const vtkm::Vec< T, 3 > &point)
Expand bounds to include a point.
Definition: Bounds.h:186
 
Bounds(const T1 &minX, const T2 &maxX, const T3 &minY, const T4 &maxY, const T5 &minZ, const T6 &maxZ)
Construct a bounds with the minimum and maximum coordinates in the x, y, and z directions.
Definition: Bounds.h:60
 
bool operator==(const vtkm::Bounds &bounds) const
Definition: Bounds.h:234
 
vtkm::Vec3f_64 MinCorner() const
Returns the min point of the bounds
Definition: Bounds.h:169
 
bool IsNonEmpty() const
Determine if the range is valid (i.e.
Definition: Range.h:70
 
vtkm::Range Intersection(const vtkm::Range &otherRange) const
Return the intersection of this and another range.
Definition: Range.h:164
 
Represent a continuous scalar range of values.
Definition: Range.h:31