engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Public 属性 | 友元 | 所有成员列表
FInterpCurve< T > 模板类 参考

Template for interpolation curves. 更多...

#include <InterpCurve.h>

Public 成员函数

int32 AddPoint (const float InVal, const T &OutVal)
 Adds a new keypoint to the InterpCurve with the supplied In and Out value. 更多...
 
void AutoSetTangents (float Tension=0.0f, bool bStationaryEndpoints=true)
 Automatically set the tangents on the curve based on surrounding points
 
void CalcBounds (T &OutMin, T &OutMax, const T &Default=T(ForceInit)) const
 Calculate the min/max out value that can be returned by this InterpCurve.
 
void ClearLoopKey ()
 Clear loop key for curve
 
T Eval (const float InVal, const T &Default=T(ForceInit)) const
 Evaluate the output for an arbitary input value. 更多...
 
T EvalDerivative (const float InVal, const T &Default=T(ForceInit)) const
 Evaluate the derivative at a point on the curve.
 
T EvalSecondDerivative (const float InVal, const T &Default=T(ForceInit)) const
 Evaluate the second derivative at a point on the curve.
 
 FInterpCurve ()
 Default constructor.
 
int32 GetPointIndexForInputValue (const float InValue) const
 Finds the lower index of the two points whose input values bound the supplied input value.
 
float InaccurateFindNearest (const T &PointInSpace, float &OutDistanceSq) const
 Find the nearest point on spline to the given point. 更多...
 
float InaccurateFindNearest (const T &PointInSpace, float &OutDistanceSq, float &OutSegment) const
 Find the nearest point on spline to the given point. 更多...
 
float InaccurateFindNearestOnSegment (const T &PointInSpace, int32 PtIdx, float &OutSquaredDistance) const
 Find the nearest point (to the given point) on segment between Points[PtIdx] and Points[PtIdx+1] 更多...
 
int32 MovePoint (int32 PointIndex, float NewInVal)
 Moves a keypoint to a new In value. 更多...
 
void Reset ()
 Clears all keypoints from InterpCurve.
 
void SetLoopKey (float InLoopKey)
 Set loop key for curve
 

Public 属性

bool bIsLooped
 Specify whether the curve is looped or not
 
float LoopKeyOffset
 Specify the offset from the last point's input key corresponding to the loop point
 
TArray< FInterpCurvePoint< T > > Points
 Holds the collection of interpolation points.
 

友元

bool operator!= (const FInterpCurve &Curve1, const FInterpCurve &Curve2)
 Compare inequality of two FInterpCurves
 
FArchive & operator<< (FArchive &Ar, FInterpCurve &Curve)
 Serializes the interp curve. 更多...
 
bool operator== (const FInterpCurve &Curve1, const FInterpCurve &Curve2)
 Compare equality of two FInterpCurves
 

详细描述

template<class T>
class FInterpCurve< T >

Template for interpolation curves.

参见
FInterpCurvePoint
待办事项:
Docs: FInterpCurve needs template and function documentation

成员函数说明

◆ AddPoint()

template<class T >
int32 FInterpCurve< T >::AddPoint ( const float  InVal,
const T &  OutVal 
)

Adds a new keypoint to the InterpCurve with the supplied In and Out value.

参数
InVal
OutVal
返回
The index of the new key.

◆ Eval()

template<class T >
T FInterpCurve< T >::Eval ( const float  InVal,
const T &  Default = T(ForceInit) 
) const

Evaluate the output for an arbitary input value.

For inputs outside the range of the keys, the first/last key value is assumed.

◆ InaccurateFindNearest() [1/2]

template<class T >
float FInterpCurve< T >::InaccurateFindNearest ( const T &  PointInSpace,
float &  OutDistanceSq 
) const

Find the nearest point on spline to the given point.

参数
PointInSpace- the given point
OutDistanceSq- output - the squared distance between the given point and the closest found point.
返回
The key (the 't' parameter) of the nearest point.

◆ InaccurateFindNearest() [2/2]

template<class T >
float FInterpCurve< T >::InaccurateFindNearest ( const T &  PointInSpace,
float &  OutDistanceSq,
float &  OutSegment 
) const

Find the nearest point on spline to the given point.

参数
PointInSpace- the given point
OutDistanceSq- output - the squared distance between the given point and the closest found point.
OutSegment- output - the nearest segment to the given point.
返回
The key (the 't' parameter) of the nearest point.

◆ InaccurateFindNearestOnSegment()

template<class T >
float FInterpCurve< T >::InaccurateFindNearestOnSegment ( const T &  PointInSpace,
int32  PtIdx,
float &  OutSquaredDistance 
) const

Find the nearest point (to the given point) on segment between Points[PtIdx] and Points[PtIdx+1]

参数
PointInSpace- the given point
返回
The key (the 't' parameter) of the found point.

◆ MovePoint()

template<class T >
int32 FInterpCurve< T >::MovePoint ( int32  PointIndex,
float  NewInVal 
)

Moves a keypoint to a new In value.

This may change the index of the keypoint, so the new key index is returned.

参数
PointIndex
NewInVal
返回

友元及相关函数文档

◆ operator<<

template<class T >
FArchive & operator<< ( FArchive &  Ar,
FInterpCurve< T > &  Curve 
)
friend

Serializes the interp curve.

参数
ArReference to the serialization archive.
CurveReference to the interp curve being serialized.
返回
Reference to the Archive after serialization.

该类的文档由以下文件生成: