HDK
|
#include <range3d.h>
Public Types | |
typedef GfVec3d | MinMaxType |
Helper typedef. More... | |
typedef GfVec3d::ScalarType | ScalarType |
Public Member Functions | |
void | SetEmpty () |
Sets the range to an empty interval. More... | |
GfRange3d () | |
The default constructor creates an empty range. More... | |
GfRange3d (const GfVec3d &min, const GfVec3d &max) | |
This constructor initializes the minimum and maximum points. More... | |
GF_API | GfRange3d (class GfRange3f const &other) |
Implicitly convert from GfRange3f. More... | |
const GfVec3d & | GetMin () const |
Returns the minimum value of the range. More... | |
const GfVec3d & | GetMax () const |
Returns the maximum value of the range. More... | |
GfVec3d | GetSize () const |
Returns the size of the range. More... | |
GfVec3d | GetMidpoint () const |
void | SetMin (const GfVec3d &min) |
Sets the minimum value of the range. More... | |
void | SetMax (const GfVec3d &max) |
Sets the maximum value of the range. More... | |
bool | IsEmpty () const |
Returns whether the range is empty (max < min). More... | |
void | ExtendBy (const GfVec3d &point) |
void | ExtendBy (const GfRange3d &range) |
bool | Contains (const GfVec3d &point) const |
bool | Contains (const GfRange3d &range) const |
bool | IsInside (const GfVec3d &point) const |
bool | IsInside (const GfRange3d &range) const |
bool | IsOutside (const GfRange3d &range) const |
const GfRange3d & | UnionWith (const GfRange3d &b) |
Extend this to include b . More... | |
const GfRange3d & | UnionWith (const GfVec3d &b) |
Extend this to include b . More... | |
const GfRange3d & | Union (const GfRange3d &b) |
const GfRange3d & | Union (const GfVec3d &b) |
const GfRange3d & | IntersectWith (const GfRange3d &b) |
const GfRange3d & | Intersection (const GfRange3d &b) |
GfRange3d & | operator+= (const GfRange3d &b) |
unary sum. More... | |
GfRange3d & | operator-= (const GfRange3d &b) |
unary difference. More... | |
GfRange3d & | operator*= (double m) |
unary multiply. More... | |
GfRange3d & | operator/= (double m) |
unary division. More... | |
GfRange3d | operator+ (const GfRange3d &b) const |
binary sum. More... | |
GfRange3d | operator- (const GfRange3d &b) const |
binary difference. More... | |
bool | operator== (const GfRange3d &b) const |
The min and max points must match exactly for equality. More... | |
bool | operator!= (const GfRange3d &b) const |
GF_API bool | operator== (const GfRange3f &other) const |
GF_API bool | operator!= (const GfRange3f &other) const |
GF_API double | GetDistanceSquared (const GfVec3d &p) const |
Compute the squared distance from a point to the range. More... | |
GF_API GfVec3d | GetCorner (size_t i) const |
GF_API GfRange3d | GetOctant (size_t i) const |
Static Public Member Functions | |
static GfRange3d | GetUnion (const GfRange3d &a, const GfRange3d &b) |
Returns the smallest GfRange3d which contains both a and b . More... | |
static GfRange3d | Union (const GfRange3d &a, const GfRange3d &b) |
static GfRange3d | GetIntersection (const GfRange3d &a, const GfRange3d &b) |
Returns a GfRange3d that describes the intersection of a and b . More... | |
static GfRange3d | Intersection (const GfRange3d &a, const GfRange3d &b) |
Static Public Attributes | |
static const size_t | dimension = GfVec3d::dimension |
static GF_API const GfRange3d | UnitCube |
The unit cube. More... | |
Friends | |
GfRange3d | operator* (double m, const GfRange3d &r) |
scalar multiply. More... | |
GfRange3d | operator* (const GfRange3d &r, double m) |
scalar multiply. More... | |
GfRange3d | operator/ (const GfRange3d &r, double m) |
scalar divide. More... | |
size_t | hash_value (const GfRange3d &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 GfVec3d GfRange3d::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 GfRange3d
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 GfRange3d
which contains both a
and b
Extend this
to include b
.
Extend this
to include b
.
|
static |