![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <Interval.h>
Public Member Functions | |
| TInterval () | |
| TInterval (ElementType InMin, ElementType InMax) | |
| void | operator+= (ElementType X) |
| void | operator-= (ElementType X) |
| bool | operator== (const TInterval &Other) const |
| bool | operator!= (const TInterval &Other) const |
| ElementType | Size () const |
| bool | IsValid () const |
| bool | Contains (const ElementType &Element) const |
| void | Expand (ElementType ExpandAmount) |
| void | Include (ElementType X) |
| ElementType | Interpolate (float Alpha) const |
| ElementType | Clamp (ElementType X) const |
| ElementType | GetRangePct (ElementType X) const |
Public Attributes | |
| ElementType | Min |
| ElementType | Max |
Friends | |
| TInterval | Intersect (const TInterval &A, const TInterval &B) |
| class FArchive & | operator<< (class FArchive &Ar, TInterval &Interval) |
| uint32 | GetTypeHash (const TInterval &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 |
Clamps X to be between the interval inclusively.
| X | the element to clamp |
|
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 |
Calculate the Percentage of X in the Interval
| X | the element to calculate the percentage |
Expands this interval if necessary to include the specified element.
| X | The element to include. |
|
inline |
Interval interpolation
| Alpha | interpolation amount |
Whether interval is valid (Min <= Max).
|
inline |
Compare two intervals for inequality.
| Other | The other interval being compared. |
Offset the interval by adding X.
| X | The offset. |
Offset the interval by subtracting X.
| X | The offset. |
|
inline |
Compare two intervals for equality.
| Other | The other interval being compared. |
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. |
Holds the upper bound of the interval.
Holds the lower bound of the interval.