Ark Server API (ASA) - Wiki
|
#include <InterpCurve.h>
Public Member Functions | |
FInterpCurve () | |
int32 | AddPoint (const float InVal, const T &OutVal) |
int32 | MovePoint (int32 PointIndex, float NewInVal) |
void | Reset () |
void | SetLoopKey (float InLoopKey) |
void | ClearLoopKey () |
T | Eval (const float InVal, const T &Default=T(ForceInit)) const |
T | EvalDerivative (const float InVal, const T &Default=T(ForceInit)) const |
T | EvalSecondDerivative (const float InVal, const T &Default=T(ForceInit)) const |
float | InaccurateFindNearest (const T &PointInSpace, float &OutDistanceSq) const |
float | InaccurateFindNearest (const T &PointInSpace, float &OutDistanceSq, float &OutSegment) const |
float | InaccurateFindNearestOnSegment (const T &PointInSpace, int32 PtIdx, float &OutSquaredDistance) const |
void | AutoSetTangents (float Tension=0.0f, bool bStationaryEndpoints=true) |
void | CalcBounds (T &OutMin, T &OutMax, const T &Default=T(ForceInit)) const |
int32 | GetPointIndexForInputValue (const float InValue) const |
Public Attributes | |
TArray< FInterpCurvePoint< T > > | Points |
bool | bIsLooped |
float | LoopKeyOffset |
Friends | |
FArchive & | operator<< (FArchive &Ar, FInterpCurve &Curve) |
bool | operator== (const FInterpCurve &Curve1, const FInterpCurve &Curve2) |
bool | operator!= (const FInterpCurve &Curve1, const FInterpCurve &Curve2) |
Template for interpolation curves.
Definition at line 23 of file InterpCurve.h.
|
inline |
Default constructor.
Definition at line 39 of file InterpCurve.h.
Adds a new keypoint to the InterpCurve with the supplied In and Out value.
InVal | |
OutVal |
Definition at line 179 of file InterpCurve.h.
Automatically set the tangents on the curve based on surrounding points
Definition at line 618 of file InterpCurve.h.
void FInterpCurve< T >::CalcBounds | ( | T & | OutMin, |
T & | OutMax, | ||
const T & | Default = T(ForceInit) ) const |
Calculate the min/max out value that can be returned by this InterpCurve.
Definition at line 686 of file InterpCurve.h.
void FInterpCurve< T >::ClearLoopKey | ( | ) |
Clear loop key for curve
Definition at line 243 of file InterpCurve.h.
Evaluate the output for an arbitary input value. For inputs outside the range of the keys, the first/last key value is assumed.
Definition at line 289 of file InterpCurve.h.
Evaluate the derivative at a point on the curve.
Definition at line 355 of file InterpCurve.h.
T FInterpCurve< T >::EvalSecondDerivative | ( | const float | InVal, |
const T & | Default = T(ForceInit) ) const |
Evaluate the second derivative at a point on the curve.
Definition at line 422 of file InterpCurve.h.
Finds the lower index of the two points whose input values bound the supplied input value.
Definition at line 250 of file InterpCurve.h.
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. |
Definition at line 485 of file InterpCurve.h.
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. |
Definition at line 492 of file InterpCurve.h.
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 |
Definition at line 530 of file InterpCurve.h.
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 |
Definition at line 189 of file InterpCurve.h.
void FInterpCurve< T >::Reset | ( | ) |
Clears all keypoints from InterpCurve.
Definition at line 211 of file InterpCurve.h.
Set loop key for curve
Definition at line 218 of file InterpCurve.h.
|
friend |
Compare inequality of two FInterpCurves
Definition at line 163 of file InterpCurve.h.
Serializes the interp curve.
Ar | Reference to the serialization archive. |
Curve | Reference to the interp curve being serialized. |
Definition at line 135 of file InterpCurve.h.
|
friend |
Compare equality of two FInterpCurves
Definition at line 153 of file InterpCurve.h.
bool FInterpCurve< T >::bIsLooped |
Specify whether the curve is looped or not
Definition at line 31 of file InterpCurve.h.
float FInterpCurve< T >::LoopKeyOffset |
Specify the offset from the last point's input key corresponding to the loop point
Definition at line 34 of file InterpCurve.h.
TArray<FInterpCurvePoint<T> > FInterpCurve< T >::Points |
Holds the collection of interpolation points.
Definition at line 28 of file InterpCurve.h.