range1#
Fully qualified name: omni::math::linalg::range1
-
template<typename T>
class range1# -
Public Functions
-
inline void SetEmpty()#
Sets the range to an empty interval.
-
inline range1()#
The default constructor creates an empty range.
-
inline explicit constexpr range1(ScalarType size)#
-
inline constexpr range1(ScalarType min, ScalarType max)#
This constructor initializes the minimum and maximum points.
-
inline ScalarType GetMin() const#
Returns the minimum value of the range.
-
inline ScalarType GetMax() const#
Returns the maximum value of the range.
-
inline ScalarType GetSize() const#
Returns the size of the range.
-
inline ScalarType 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(ScalarType min)#
Sets the minimum value of the range.
-
inline void SetMax(ScalarType max)#
Sets the maximum value of the range.
-
inline bool IsEmpty() const#
Returns whether the range is empty (max < min).
-
inline void ExtendBy(ScalarType 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 ScalarType &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(ScalarType 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 ScalarType &b)#
Extend
this
to includeb
.
-
inline const ThisType &Union(const ThisType &b)#
Extend
this
to includeb
.- Deprecated:
Use UnionWith() instead.
-
inline const ThisType &Union(ScalarType 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 double GetDistanceSquared(ScalarType p) const#
Compute the squared distance from a point to the range.
Public Static Functions
-
static inline ThisType GetUnion(const ThisType &a, const ThisType &b)#
Returns the smallest
GfRange1f
which contains botha
andb
.
-
static inline ThisType Union(const ThisType &a, const ThisType &b)#
Returns the smallest
GfRange1f
which contains botha
andb
.- Deprecated:
Use GetUnion() instead.
- static inline ThisType GetIntersection( )#
Returns a
GfRange1f
that describes the intersection ofa
andb
.
- static inline ThisType Intersection( )#
Returns a
GfRange1f
that describes the intersection ofa
andb
.- Deprecated:
Use GetIntersection() instead.
Public Static Attributes
-
static const size_t dimension = 1#
-
inline void SetEmpty()#