HDK
|
#include <range3f.h>
Public Types | |
typedef GfVec3f | MinMaxType |
Helper typedef. More... | |
typedef GfVec3f::ScalarType | ScalarType |
Public Member Functions | |
void | SetEmpty () |
Sets the range to an empty interval. More... | |
GfRange3f () | |
The default constructor creates an empty range. More... | |
GfRange3f (const GfVec3f &min, const GfVec3f &max) | |
This constructor initializes the minimum and maximum points. More... | |
GF_API | GfRange3f (class GfRange3d const &other) |
Construct from GfRange3d. More... | |
const GfVec3f & | GetMin () const |
Returns the minimum value of the range. More... | |
const GfVec3f & | GetMax () const |
Returns the maximum value of the range. More... | |
GfVec3f | GetSize () const |
Returns the size of the range. More... | |
GfVec3f | GetMidpoint () const |
void | SetMin (const GfVec3f &min) |
Sets the minimum value of the range. More... | |
void | SetMax (const GfVec3f &max) |
Sets the maximum value of the range. More... | |
bool | IsEmpty () const |
Returns whether the range is empty (max < min). More... | |
void | ExtendBy (const GfVec3f &point) |
void | ExtendBy (const GfRange3f &range) |
bool | Contains (const GfVec3f &point) const |
bool | Contains (const GfRange3f &range) const |
bool | IsInside (const GfVec3f &point) const |
bool | IsInside (const GfRange3f &range) const |
bool | IsOutside (const GfRange3f &range) const |
const GfRange3f & | UnionWith (const GfRange3f &b) |
Extend this to include b . More... | |
const GfRange3f & | UnionWith (const GfVec3f &b) |
Extend this to include b . More... | |
const GfRange3f & | Union (const GfRange3f &b) |
const GfRange3f & | Union (const GfVec3f &b) |
const GfRange3f & | IntersectWith (const GfRange3f &b) |
const GfRange3f & | Intersection (const GfRange3f &b) |
GfRange3f & | operator+= (const GfRange3f &b) |
unary sum. More... | |
GfRange3f & | operator-= (const GfRange3f &b) |
unary difference. More... | |
GfRange3f & | operator*= (double m) |
unary multiply. More... | |
GfRange3f & | operator/= (double m) |
unary division. More... | |
GfRange3f | operator+ (const GfRange3f &b) const |
binary sum. More... | |
GfRange3f | operator- (const GfRange3f &b) const |
binary difference. More... | |
bool | operator== (const GfRange3f &b) const |
The min and max points must match exactly for equality. More... | |
bool | operator!= (const GfRange3f &b) const |
GF_API bool | operator== (const GfRange3d &other) const |
GF_API bool | operator!= (const GfRange3d &other) const |
GF_API double | GetDistanceSquared (const GfVec3f &p) const |
Compute the squared distance from a point to the range. More... | |
GF_API GfVec3f | GetCorner (size_t i) const |
GF_API GfRange3f | GetOctant (size_t i) const |
Static Public Member Functions | |
static GfRange3f | GetUnion (const GfRange3f &a, const GfRange3f &b) |
Returns the smallest GfRange3f which contains both a and b . More... | |
static GfRange3f | Union (const GfRange3f &a, const GfRange3f &b) |
static GfRange3f | GetIntersection (const GfRange3f &a, const GfRange3f &b) |
Returns a GfRange3f that describes the intersection of a and b . More... | |
static GfRange3f | Intersection (const GfRange3f &a, const GfRange3f &b) |
Static Public Attributes | |
static const size_t | dimension = GfVec3f::dimension |
static GF_API const GfRange3f | UnitCube |
The unit cube. More... | |
Friends | |
GfRange3f | operator* (double m, const GfRange3f &r) |
scalar multiply. More... | |
GfRange3f | operator* (const GfRange3f &r, double m) |
scalar multiply. More... | |
GfRange3f | operator/ (const GfRange3f &r, double m) |
scalar divide. More... | |
size_t | hash_value (const GfRange3f &r) |
hash. More... | |
Basic type: 3-dimensional floating point range.
This class represents a 3-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 GfVec3f GfRange3f::MinMaxType |
|
inline |
|
inline |
|
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: LDB, RDB, LUB, RUB, LDF, RDF, LUF, RUF. Where L/R is left/right, D/U is down/up, and B/F is back/front.
Compute the squared distance from a point to the range.
|
inline |
|
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().
|
inline |
Returns the ith octant of the range, in the following order: LDB, RDB, LUB, RUB, LDF, RDF, LUF, RUF. Where L/R is left/right, D/U is down/up, and B/F is back/front.
|
inline |
Returns a GfRange3f
that describes the intersection of a
and b
.
Modifies this range to hold its intersection with b
and returns the result.
|
inline |
|
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.
|
inline |
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 |
|
inline |
|
inline |
Returns the smallest GfRange3f
which contains both a
and b
Extend this
to include b
.
Extend this
to include b
.
|
static |