omni::math::linalg::range2
Defined in usdrt/gf/range.h
Functions
omni::math::linalg::range2::Contains: 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.omni::math::linalg::range2::Contains: 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.omni::math::linalg::range2::ExtendBy: Modifies the range if necessary to surround the given range.
omni::math::linalg::range2::ExtendBy: Modifies the range if necessary to surround the given value.
omni::math::linalg::range2::GetCorner: Returns the ith corner of the range, in the following order: SW, SE, NW, NE.
omni::math::linalg::range2::GetDistanceSquared: Compute the squared distance from a point to the range.
omni::math::linalg::range2::GetIntersection: Returns a
ThisType
that describes the intersection ofa
andb
.omni::math::linalg::range2::GetMax: Returns the maximum value of the range.
omni::math::linalg::range2::GetMidpoint: 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() .
omni::math::linalg::range2::GetMin: Returns the minimum value of the range.
omni::math::linalg::range2::GetQuadrant: Returns the ith quadrant of the range, in the following order: SW, SE, NW, NE.
omni::math::linalg::range2::GetSize: Returns the size of the range.
omni::math::linalg::range2::GetUnion: Returns the smallest
ThisType
which contains botha
andb
.omni::math::linalg::range2::IntersectWith: Modifies this range to hold its intersection with
b
and returns the result.omni::math::linalg::range2::Intersection: Returns a
ThisType
that describes the intersection ofa
andb
.omni::math::linalg::range2::Intersection: Modifies this range to hold its intersection with
b
and returns the result.omni::math::linalg::range2::IsEmpty: Returns whether the range is empty (max < min).
omni::math::linalg::range2::IsInside: 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.omni::math::linalg::range2::IsInside: 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.omni::math::linalg::range2::IsOutside: Returns true if the
range
is located entirely outside the range. As with all operations of this type, the ranges are assumed to include their extrema.omni::math::linalg::range2::SetEmpty: Sets the range to an empty interval.
omni::math::linalg::range2::SetMax: Sets the maximum value of the range.
omni::math::linalg::range2::SetMin: Sets the minimum value of the range.
omni::math::linalg::range2::Union: Extend
this
to includeb
.omni::math::linalg::range2::Union: Returns the smallest
ThisType
which contains botha
andb
.omni::math::linalg::range2::Union: Extend
this
to includeb
.omni::math::linalg::range2::UnionWith: Extend
this
to includeb
.omni::math::linalg::range2::UnionWith: Extend
this
to includeb
.omni::math::linalg::range2::UnitSquare: The unit square.
omni::math::linalg::range2::operator*=: unary multiply.
omni::math::linalg::range2::operator+: binary sum.
omni::math::linalg::range2::operator+=: unary sum.
omni::math::linalg::range2::operator-: binary difference.
omni::math::linalg::range2::operator-=: unary difference.
omni::math::linalg::range2::operator/=: unary division.
omni::math::linalg::range2::operator==: The min and max points must match exactly for equality.
omni::math::linalg::range2::range2: This constructor initializes the minimum and maximum points.
Typedefs
Variables
-
template<typename T>
class range2 Public Types
Public Functions
-
inline range2()
-
inline explicit constexpr range2(ScalarType size)
-
inline constexpr void SetEmpty()
Sets the range to an empty interval.
-
inline constexpr range2(const MinMaxType &min, const MinMaxType &max)
This constructor initializes the minimum and maximum points.
-
inline const MinMaxType &GetMin() const
Returns the minimum value of the range.
-
inline const MinMaxType &GetMax() const
Returns the maximum value of the range.
-
inline MinMaxType GetSize() const
Returns the size of the range.
-
inline MinMaxType GetMidpoint() const
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 void SetMin(const MinMaxType &min)
Sets the minimum value of the range.
-
inline void SetMax(const MinMaxType &max)
Sets the maximum value of the range.
-
inline bool IsEmpty() const
Returns whether the range is empty (max < min).
-
inline void ExtendBy(const MinMaxType &point)
Modifies the range if necessary to surround the given value.
- Deprecated:
Use UnionWith() instead.
-
inline void ExtendBy(const ThisType &range)
Modifies the range if necessary to surround the given range.
- Deprecated:
Use UnionWith() instead.
-
inline bool Contains(const MinMaxType &point) const
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 bool Contains(const ThisType &range) const
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 bool IsInside(const MinMaxType &point) const
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.- Deprecated:
Use Contains() instead.
-
inline bool IsInside(const ThisType &range) const
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.- Deprecated:
Use Contains() instead.
-
inline bool IsOutside(const ThisType &range) const
Returns true if the
range
is located entirely outside the range. As with all operations of this type, the ranges are assumed to include their extrema.
-
inline const ThisType &UnionWith(const MinMaxType &b)
Extend
this
to includeb
.
-
inline const ThisType &Union(const ThisType &b)
Extend
this
to includeb
.- Deprecated:
Use UnionWith() instead.
-
inline const ThisType &Union(const MinMaxType &b)
Extend
this
to includeb
.- Deprecated:
Use UnionWith() instead.
-
inline const ThisType &IntersectWith(const ThisType &b)
Modifies this range to hold its intersection with
b
and returns the result.
-
inline const ThisType &Intersection(const ThisType &b)
Modifies this range to hold its intersection with
b
and returns the result.- Deprecated:
Use IntersectWith() instead.
-
inline bool operator==(const ThisType &b) const
The min and max points must match exactly for equality.
-
inline double GetDistanceSquared(const MinMaxType &p) const
Compute the squared distance from a point to the range.
-
inline MinMaxType GetCorner(size_t i) const
Returns the ith corner of the range, in the following order: SW, SE, NW, NE.
Public Static Functions
-
static inline ThisType GetUnion(const ThisType &a, const ThisType &b)
Returns the smallest
ThisType
which contains botha
andb
.
-
static inline ThisType Union(const ThisType &a, const ThisType &b)
Returns the smallest
ThisType
which contains botha
andb
.- Deprecated:
Use GetUnion() instead.
-
static inline ThisType GetIntersection(const ThisType &a, const ThisType &b)
Returns a
ThisType
that describes the intersection ofa
andb
.
-
static inline ThisType Intersection(const ThisType &a, const ThisType &b)
Returns a
ThisType
that describes the intersection ofa
andb
.- Deprecated:
Use GetIntersection() instead.
Public Static Attributes
-
static const size_t dimension = 2
-
inline range2()