 |
AGXDynamics
2.35.0.3
|
Go to the documentation of this file.
83 Range(
const T& Min,
const T& Max );
92 explicit Range(
const T& x );
98 Range(
const Range& rhs,
const T& value,
size_t i );
145 template<
typename T2 >
163 bool inside(
const T& x )
const;
175 template <
typename T2>
182 template <
typename T>
185 stream << range.
lower() <<
" " << range.
upper();
251 mMax( std::numeric_limits<T>::infinity() ) {}
321 return mMin == -std::numeric_limits<T>::infinity() && mMax == std::numeric_limits<T>::infinity();
333 this->mMax = rhs.mMax;
335 this->mMin = rhs.mMin;
343 template<
typename T2 >
346 return Range< T >( mMin * (T)rhs, mMax * (T)rhs );
354 if ( x <= lhs.mMin ) {
356 ret.
excess() = lhs.mMin - x;
357 }
else if ( x >= lhs.mMax ) {
359 ret.
excess() = x - lhs.mMax;
369 if ( x < lhs.mMin ) {
371 }
else if ( x > lhs.mMax ) {
381 return (x >= lhs.mMin) && (x <= lhs.mMax) ;
387 return ( inside(r.
lower()) || inside(r.
upper())
395 std::swap(mMax, mMin);
int outside(const T &x) const
Vec3T< T > operator*(const Vec3T< T > &v, const AffineMatrix4x4T< T > &m)
Range & operator=(const Range &rhs)
Assignment operator.
Range()
Default constructor. Set min/max to -/+ infinity.
void setLower(T lower)
Set the lower bound for the range.
RangeViolation< T > excess(const T &x) const
Compute all the details of range violation: parity is +1 when violating the upper limit,...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
bool inside(const T &x) const
std::ostream & operator<<(std::ostream &stream, const AtomicValueT< T > &value)
bool overlap(const Range< T > &r) const
friend std::ostream & operator<<(std::ostream &stream, const Range< T > &range)
Range< UInt > RangeUInt
A short hand for ranges of unsigned integer numbers.
Range< Real > RangeReal
A short hand for ranges of floating point numbers.
RangeViolation()
Default constructor. sign=0, v=0.
This class will store a computed violation of a range.
A range object has a min and max value of a given type and provides services to tell whether a value ...
RangeViolation< Real > RangeViolationReal
void setUpper(T upper)
Set the upper bound for the range.
Range operator*(const T2 &rhs) const
RangeViolation< UInt > RangeViolationUInt