11 #ifndef PXR_BASE_GF_RANGE2D_H 
   12 #define PXR_BASE_GF_RANGE2D_H 
   59         _min[0] = _min[1] =  FLT_MAX;
 
   60         _max[0] = _max[1] = -FLT_MAX;
 
   70         : _min(min), _max(max)
 
  104         return _min[0] > _max[0] || _min[1] > _max[1];
 
  118         return (point[0] >= _min[0] && point[0] <= _max[0]
 
  119              && point[1] >= _min[1] && point[1] <= _max[1]);
 
  148         return ((range._max[0] < _min[0] || range._min[0] > _max[0])
 
  149              || (range._max[1] < _min[1] || range._min[1] > _max[1]));
 
  155         _FindMin(res._min,b._min);
 
  156         _FindMax(res._max,b._max);
 
  162         _FindMin(_min,b._min);
 
  163         _FindMax(_max,b._max);
 
  195         _FindMax(res._min,b._min);
 
  196         _FindMin(res._max,b._max);
 
  209         _FindMax(_min,b._min);
 
  210         _FindMin(_max,b._max);
 
  250         return *
this *= (1.0 / m);
 
  255         return GfRange2d(_min + b._min, _max + b._max);
 
  261         return GfRange2d(_min - b._max, _max - b._min);
 
  280         return r * (1.0 / m);
 
  290         return (_min == b._min && _max == b._max);
 
  294         return !(*
this == 
b);
 
  328         if (point[0] < dest[0]) dest[0] = point[0];
 
  329         if (point[1] < dest[1]) dest[1] = point[1];
 
  334         if (point[0] > dest[0]) dest[0] = point[0];
 
  335         if (point[1] > dest[1]) dest[1] = point[1];
 
  355     return !(*
this == other);
 
  361 #endif // PXR_BASE_GF_RANGE2D_H 
static GfRange2d Union(const GfRange2d &a, const GfRange2d &b)
 
const GfVec2d & GetMax() const 
Returns the maximum value of the range. 
 
GfRange2d operator-(const GfRange2d &b) const 
binary difference. 
 
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the and then *wait for them to all complete We provide a helper class
 
GLsizei const GLfloat * value
 
bool Contains(const GfRange2d &range) const 
 
bool IsInside(const GfVec2d &point) const 
 
GLboolean GLboolean GLboolean GLboolean a
 
void ExtendBy(const GfRange2d &range)
 
bool IsEmpty() const 
Returns whether the range is empty (max < min). 
 
bool IsOutside(const GfRange2d &range) const 
 
ImageBuf OIIO_API min(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
 
const GfRange2d & UnionWith(const GfVec2d &b)
Extend this to include b. 
 
static GfRange2d GetUnion(const GfRange2d &a, const GfRange2d &b)
Returns the smallest GfRange2d which contains both a and b. 
 
static GfRange2d Intersection(const GfRange2d &a, const GfRange2d &b)
 
const GfRange2d & IntersectWith(const GfRange2d &b)
 
static const size_t dimension
 
const GfRange2d & Union(const GfVec2d &b)
 
void ExtendBy(const GfVec2d &point)
 
GfRange2d & operator*=(double m)
unary multiply. 
 
static const size_t dimension
 
GF_API GfRange2d GetQuadrant(size_t i) const 
 
friend GfRange2d operator*(double m, const GfRange2d &r)
scalar multiply. 
 
bool operator!=(const GfRange2d &b) const 
 
bool IsInside(const GfRange2d &range) const 
 
GfRange2d & operator+=(const GfRange2d &b)
unary sum. 
 
GfVec2d MinMaxType
Helper typedef. 
 
GfRange2d & operator/=(double m)
unary division. 
 
const GfRange2d & UnionWith(const GfRange2d &b)
Extend this to include b. 
 
bool Contains(const GfVec2d &point) const 
 
GF_API GfVec2d GetCorner(size_t i) const 
 
void SetMax(const GfVec2d &max)
Sets the maximum value of the range. 
 
const GfVec2f & GetMax() const 
Returns the maximum value of the range. 
 
double ScalarType
Scalar element type and dimension. 
 
friend size_t hash_value(const GfRange2d &r)
hash. 
 
GLboolean GLboolean GLboolean b
 
const GfRange2d & Intersection(const GfRange2d &b)
 
GfRange2d()
The default constructor creates an empty range. 
 
GfRange2d(const GfVec2d &min, const GfVec2d &max)
This constructor initializes the minimum and maximum points. 
 
static size_t Combine(Args &&...args)
Produce a hash code by combining the hash codes of several objects. 
 
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
 
const GfRange2d & Union(const GfRange2d &b)
 
GfVec2d GetSize() const 
Returns the size of the range. 
 
const GfVec2d & GetMin() const 
Returns the minimum value of the range. 
 
ImageBuf OIIO_API max(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
 
#define PXR_NAMESPACE_CLOSE_SCOPE
 
GF_API double GetDistanceSquared(const GfVec2d &p) const 
Compute the squared distance from a point to the range. 
 
GfRange2d & operator-=(const GfRange2d &b)
unary difference. 
 
GF_API std::ostream & operator<<(std::ostream &, GfRange2d const &)
 
static GfRange2d GetIntersection(const GfRange2d &a, const GfRange2d &b)
Returns a GfRange2d that describes the intersection of a and b. 
 
GfVec2d GetMidpoint() const 
 
static GF_API const GfRange2d UnitSquare
The unit square. 
 
const GfVec2f & GetMin() const 
Returns the minimum value of the range. 
 
friend GfRange2d operator/(const GfRange2d &r, double m)
scalar divide. 
 
bool operator==(const GfRange2d &b) const 
The min and max points must match exactly for equality. 
 
GfVec2d::ScalarType ScalarType
 
GfRange2d operator+(const GfRange2d &b) const 
binary sum. 
 
void SetMin(const GfVec2d &min)
Sets the minimum value of the range. 
 
void SetEmpty()
Sets the range to an empty interval.