HDK
|
#include <range2f.h>
Public Types | |
typedef GfVec2f | MinMaxType |
Helper typedef. More... | |
typedef GfVec2f::ScalarType | ScalarType |
Static Public Member Functions | |
static GfRange2f | GetUnion (const GfRange2f &a, const GfRange2f &b) |
Returns the smallest GfRange2f which contains both a and b . More... | |
static GfRange2f | Union (const GfRange2f &a, const GfRange2f &b) |
static GfRange2f | GetIntersection (const GfRange2f &a, const GfRange2f &b) |
Returns a GfRange2f that describes the intersection of a and b . More... | |
static GfRange2f | Intersection (const GfRange2f &a, const GfRange2f &b) |
Static Public Attributes | |
static const size_t | dimension = GfVec2f::dimension |
static GF_API const GfRange2f | UnitSquare |
The unit square. More... | |
Friends | |
GfRange2f | operator* (double m, const GfRange2f &r) |
scalar multiply. More... | |
GfRange2f | operator* (const GfRange2f &r, double m) |
scalar multiply. More... | |
GfRange2f | operator/ (const GfRange2f &r, double m) |
scalar divide. More... | |
size_t | hash_value (const GfRange2f &r) |
hash. More... | |
Basic type: 2-dimensional floating point range.
This class represents a 2-dimensional range (or interval) All operations are component-wise and conform to interval mathematics. An empty range is one where max < min. The default empty is [FLT_MAX,-FLT_MAX]
typedef GfVec2f GfRange2f::MinMaxType |
|
inline |
Modifies the range if necessary to surround the given value.
Modifies the range if necessary to surround the given range.
Returns the ith corner of the range, in the following order: SW, SE, NW, NE.
Compute the squared distance from a point to the range.
|
inline |
Returns the midpoint of the range, that is, 0.5*(min+max). Note: this returns zero in the case of default-constructed ranges, or ranges set via SetEmpty().
Returns the ith quadrant of the range, in the following order: SW, SE, NW, NE.
|
inline |
Returns a GfRange2f
that describes the intersection of a
and b
.
Modifies this range to hold its intersection with b
and returns the result.
|
inline |
Returns true if the point
is located inside the range. As with all operations of this type, the range is assumed to include its extrema.
Returns true if the range
is located entirely inside the range. As with all operations of this type, the ranges are assumed to include their extrema.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns the smallest GfRange2f
which contains both a
and b
Extend this
to include b
.
Extend this
to include b
.
|
static |