Represents a range of floating point values. More...
#include <eVision/Easy/EFloatRange.h>
Public Member Functions | |
| EFloatRange () | |
| Creates an EFloatRange::EFloatRange object. | |
| EFloatRange (float min, float max) | |
| Creates an EFloatRange::EFloatRange object. | |
| EFloatRange (const eVision::EFloatRange &range) | |
| Creates an EFloatRange::EFloatRange object. | |
| virtual | ~EFloatRange () throw () |
| eVision::EFloatRange & | operator= (const eVision::EFloatRange &other) |
| Assignment operator. | |
| bool | operator== (const eVision::EFloatRange &other) const |
| Equality operator. | |
| bool | operator!= (const eVision::EFloatRange &other) const |
| Inequality operator. | |
| void | SetBounds (float min, float max) |
| Sets the bounds of the range. | |
| void | SetFromBaseAndAbsoluteTolerance (float baseValue, float tolerance) |
| Sets the bounds of the range from a base value and an absolute tolerance from this base value. | |
| void | SetFromBaseAndRelativeTolerance (float baseValue, float tolerance) |
| Sets the bounds of the range from a base value and a relative tolerance from this base value. | |
| void | Update (float value) |
| Updates the range. If the value passed is outside of the range bounds, they are modified so they include the value. | |
| void | Update (const eVision::EFloatRange &other) |
| Updates the range. If the range passed is not fully included in the range bounds, they are modified to include the given range. | |
| float | GetLowerBound () const |
| Lower bound of the range. | |
| float | GetUpperBound () const |
| Upper bound of the range. | |
| float | GetCenter () const |
| Center of the range. | |
| float | GetSize () const |
| Size of the range. | |
| bool | IsValid () const |
| Returns true if the range is defined and valid. | |
| bool | IsInRange (float value, bool lowerBoundInclusive, bool upperBoundInclusive) const |
| Checks if a value is inside the range. | |
| bool | IsInRange (float value, bool lowerBoundInclusive) const |
| Checks if a value is inside the range. | |
| bool | IsInRange (float value) const |
| Checks if a value is inside the range. | |
| EFloatRange (CppWrapperInternal::InternalConstructor) | |
Public Attributes | |
| CppWrapperInternal::WrappedClass | wrappedClass_ |
Represents a range of floating point values.
License(s): BasicTypes
| eVision::EFloatRange::EFloatRange | ( | ) |
Creates an EFloatRange::EFloatRange object.
| eVision::EFloatRange::EFloatRange | ( | float | min, |
| float | max ) |
Creates an EFloatRange::EFloatRange object.
| min | Lower bound of the range. |
| max | Upper bound of the range. |
| eVision::EFloatRange::EFloatRange | ( | const eVision::EFloatRange & | range | ) |
Creates an EFloatRange::EFloatRange object.
| range | Range to copy. |
|
virtual | ||||||||||||
| eVision::EFloatRange::EFloatRange | ( | CppWrapperInternal::InternalConstructor | ) |
| float eVision::EFloatRange::GetCenter | ( | ) | const |
Center of the range.
| float eVision::EFloatRange::GetLowerBound | ( | ) | const |
Lower bound of the range.
| float eVision::EFloatRange::GetSize | ( | ) | const |
Size of the range.
| float eVision::EFloatRange::GetUpperBound | ( | ) | const |
Upper bound of the range.
| bool eVision::EFloatRange::IsInRange | ( | float | value | ) | const |
Checks if a value is inside the range.
| value | Value to test. |
| bool eVision::EFloatRange::IsInRange | ( | float | value, |
| bool | lowerBoundInclusive ) const |
Checks if a value is inside the range.
| value | Value to test. |
| lowerBoundInclusive | Indicates if the lower bound should be considered inside the range (true) or outside (false). |
| bool eVision::EFloatRange::IsInRange | ( | float | value, |
| bool | lowerBoundInclusive, | ||
| bool | upperBoundInclusive ) const |
Checks if a value is inside the range.
| value | Value to test. |
| lowerBoundInclusive | Indicates if the lower bound should be considered inside the range (true) or outside (false). |
| upperBoundInclusive | Indicates if the upper bound should be considered inside the range (true) or outside (false). |
| bool eVision::EFloatRange::IsValid | ( | ) | const |
Returns true if the range is defined and valid.
| bool eVision::EFloatRange::operator!= | ( | const eVision::EFloatRange & | other | ) | const |
Inequality operator.
| other | The other object. |
| eVision::EFloatRange & eVision::EFloatRange::operator= | ( | const eVision::EFloatRange & | other | ) |
Assignment operator.
| other | The other EFloatRange that we will copy into this one. |
| bool eVision::EFloatRange::operator== | ( | const eVision::EFloatRange & | other | ) | const |
Equality operator.
| other | The other object. |
| void eVision::EFloatRange::SetBounds | ( | float | min, |
| float | max ) |
Sets the bounds of the range.
| min | Lower bound of the range. |
| max | Upper bound of the range. |
| void eVision::EFloatRange::SetFromBaseAndAbsoluteTolerance | ( | float | baseValue, |
| float | tolerance ) |
Sets the bounds of the range from a base value and an absolute tolerance from this base value.
| baseValue | Base value. |
| tolerance | Absolute tolerance around the base value. Must be positive. |
The range will be set with a lower bound of (base - tolerance) and an upper bound of (base + tolerance).
| void eVision::EFloatRange::SetFromBaseAndRelativeTolerance | ( | float | baseValue, |
| float | tolerance ) |
Sets the bounds of the range from a base value and a relative tolerance from this base value.
| baseValue | Base value. |
| tolerance | Relative tolerance around the base value. Must be positive. |
The range will be set with a lower bound of (base - (base * tolerance)) and an upper bound of (base + (base * tolerance)).
| void eVision::EFloatRange::Update | ( | const eVision::EFloatRange & | other | ) |
Updates the range. If the range passed is not fully included in the range bounds, they are modified to include the given range.
| other | Range to be included in the range. |
| void eVision::EFloatRange::Update | ( | float | value | ) |
Updates the range. If the value passed is outside of the range bounds, they are modified so they include the value.
| value | Value to be included in the range. |
| CppWrapperInternal::WrappedClass eVision::EFloatRange::wrappedClass_ |