Template for numeric interval 更多...
#include <Interval.h>
Public 成员函数 | |
| bool | Contains (const ElementType &Element) const |
| Checks whether this interval contains the specified element. 更多... | |
| void | Expand (ElementType ExpandAmount) |
| Expands this interval to both sides by the specified amount. 更多... | |
| void | Include (ElementType X) |
| Expands this interval if necessary to include the specified element. 更多... | |
| ElementType | Interpolate (float Alpha) const |
| Interval interpolation 更多... | |
| bool | IsValid () const |
| Whether interval is valid (Min <= Max). 更多... | |
| void | operator+= (ElementType X) |
| Offset the interval by adding X. 更多... | |
| void | operator-= (ElementType X) |
| Offset the interval by subtracting X. 更多... | |
| ElementType | Size () const |
| Computes the size of this interval. 更多... | |
| TInterval () | |
| Default constructor. 更多... | |
| TInterval (ElementType InMin, ElementType InMax) | |
| Creates and initializes a new interval with the specified lower and upper bounds. 更多... | |
Public 属性 | |
| ElementType | Max |
| Holds the upper bound of the interval. | |
| ElementType | Min |
| Holds the lower bound of the interval. | |
友元 | |
| uint32 | GetTypeHash (const TInterval &Interval) |
| Gets the hash for the specified interval. 更多... | |
| TInterval | Intersect (const TInterval &A, const TInterval &B) |
| Calculates the intersection of two intervals. 更多... | |
| class FArchive & | operator<< (class FArchive &Ar, TInterval &Interval) |
| Serializes the interval. 更多... | |
Template for numeric interval
|
inline |
Default constructor.
The interval is invalid
|
inline |
Creates and initializes a new interval with the specified lower and upper bounds.
| InMin | The lower bound of the constructed interval. |
| InMax | The upper bound of the constructed interval. |
|
inline |
Checks whether this interval contains the specified element.
| Element | The element to check. |
|
inline |
Expands this interval to both sides by the specified amount.
| ExpandAmount | The amount to expand by. |
|
inline |
Expands this interval if necessary to include the specified element.
| X | The element to include. |
|
inline |
Interval interpolation
| Alpha | interpolation amount |
|
inline |
Whether interval is valid (Min <= Max).
|
inline |
Offset the interval by adding X.
| X | The offset. |
|
inline |
Offset the interval by subtracting X.
| X | The offset. |
|
inline |
Computes the size of this interval.
|
friend |
Gets the hash for the specified interval.
| Interval | The Interval to get the hash for. |
|
friend |
Calculates the intersection of two intervals.
| A | The first interval. |
| B | The second interval. |
|
friend |
Serializes the interval.
| Ar | The archive to serialize into. |
| Interval | The interval to serialize. |