engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Public 属性 | 友元 | 所有成员列表
TInterval< ElementType > 模板结构体 参考

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<typename ElementType>
struct TInterval< ElementType >

Template for numeric interval

构造及析构函数说明

◆ TInterval() [1/2]

template<typename ElementType >
TInterval< ElementType >::TInterval ( )
inline

Default constructor.

The interval is invalid

◆ TInterval() [2/2]

template<typename ElementType >
TInterval< ElementType >::TInterval ( ElementType  InMin,
ElementType  InMax 
)
inline

Creates and initializes a new interval with the specified lower and upper bounds.

参数
InMinThe lower bound of the constructed interval.
InMaxThe upper bound of the constructed interval.

成员函数说明

◆ Contains()

template<typename ElementType >
bool TInterval< ElementType >::Contains ( const ElementType &  Element) const
inline

Checks whether this interval contains the specified element.

参数
ElementThe element to check.
返回
true if the range interval the element, false otherwise.

◆ Expand()

template<typename ElementType >
void TInterval< ElementType >::Expand ( ElementType  ExpandAmount)
inline

Expands this interval to both sides by the specified amount.

参数
ExpandAmountThe amount to expand by.

◆ Include()

template<typename ElementType >
void TInterval< ElementType >::Include ( ElementType  X)
inline

Expands this interval if necessary to include the specified element.

参数
XThe element to include.

◆ Interpolate()

template<typename ElementType >
ElementType TInterval< ElementType >::Interpolate ( float  Alpha) const
inline

Interval interpolation

参数
Alphainterpolation amount
返回
interpolation result

◆ IsValid()

template<typename ElementType >
bool TInterval< ElementType >::IsValid ( ) const
inline

Whether interval is valid (Min <= Max).

返回
false when interval is invalid, true otherwise

◆ operator+=()

template<typename ElementType >
void TInterval< ElementType >::operator+= ( ElementType  X)
inline

Offset the interval by adding X.

参数
XThe offset.

◆ operator-=()

template<typename ElementType >
void TInterval< ElementType >::operator-= ( ElementType  X)
inline

Offset the interval by subtracting X.

参数
XThe offset.

◆ Size()

template<typename ElementType >
ElementType TInterval< ElementType >::Size ( ) const
inline

Computes the size of this interval.

返回
Interval size.

友元及相关函数文档

◆ GetTypeHash

template<typename ElementType >
uint32 GetTypeHash ( const TInterval< ElementType > &  Interval)
friend

Gets the hash for the specified interval.

参数
IntervalThe Interval to get the hash for.
返回
Hash value.

◆ Intersect

template<typename ElementType >
TInterval Intersect ( const TInterval< ElementType > &  A,
const TInterval< ElementType > &  B 
)
friend

Calculates the intersection of two intervals.

参数
AThe first interval.
BThe second interval.
返回
The intersection.

◆ operator<<

template<typename ElementType >
class FArchive & operator<< ( class FArchive &  Ar,
TInterval< ElementType > &  Interval 
)
friend

Serializes the interval.

参数
ArThe archive to serialize into.
IntervalThe interval to serialize.
返回
Reference to the Archive after serialization.

该结构体的文档由以下文件生成: