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