UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FSpline Struct Reference

#include <Spline.h>

Classes

struct  FUpdateSplineParams
 

Public Member Functions

ENGINE_API FSpline ()
 
ENGINE_API FSpline (const FSpline &Other)
 
ENGINE_API FSplineoperator= (const FSpline &Other)
 
ENGINE_API FSplineoperator= (const FSplineCurves &Other)
 
ENGINE_API ~FSpline ()
 
ENGINE_API void AddPoint (const FSplinePoint &InPoint)
 
ENGINE_API void InsertPoint (const FSplinePoint &InPoint, int32 Index)
 
ENGINE_API FSplinePoint GetPoint (const int32 Index) const
 
ENGINE_API void RemovePoint (const int32 Index)
 
ENGINE_API void SetLocation (int32 Index, const FVector &InLocation)
 
ENGINE_API FVector GetLocation (const int32 Index) const
 
ENGINE_API void SetInTangent (const int32 Index, const FVector &InTangent)
 
ENGINE_API FVector GetInTangent (const int32 Index) const
 
ENGINE_API void SetOutTangent (const int32 Index, const FVector &OutTangent)
 
ENGINE_API FVector GetOutTangent (const int32 Index) const
 
ENGINE_API void SetRotation (int32 Index, const FQuat &InRotation)
 
ENGINE_API FQuat GetRotation (const int32 Index) const
 
ENGINE_API void SetScale (int32 Index, const FVector &InScale)
 
ENGINE_API FVector GetScale (const int32 Index) const
 
ENGINE_API void SetSplinePointType (int32 Index, EInterpCurveMode Type)
 
ENGINE_API EInterpCurveMode GetSplinePointType (int32 Index) const
 
ENGINE_API float GetParameterAtIndex (int32 Index) const
 
ENGINE_API float GetParameterAtDistance (float Distance) const
 
ENGINE_API float GetDistanceAtParameter (float Parameter) const
 
ENGINE_API FQuat GetOrientation (int32 Index) const
 
ENGINE_API void SetOrientation (int32 Index, const FQuat &InOrientation)
 
ENGINE_API FVector Evaluate (float Param) const
 
ENGINE_API FVector EvaluateDerivative (float Param) const
 
ENGINE_API FQuat EvaluateRotation (float Param) const
 
ENGINE_API FVector EvaluateScale (float Param) const
 
ENGINE_API FQuat GetOrientation (float Param) const
 
bool SupportsAttributes () const
 
ENGINE_API bool HasAttributeChannel (FName AttributeName) const
 
ENGINE_API bool RemoveAttributeChannel (FName AttributeName) const
 
ENGINE_API TArray< FNameGetFloatPropertyChannels () const
 
ENGINE_API TArray< FNameGetVectorPropertyChannels () const
 
template<typename AttrType >
ENGINE_API float GetAttributeParameter (int32 Index, const FName &Name) const
 
template<typename AttrType >
ENGINE_API int32 SetAttributeParameter (int32 Index, float Parameter, const FName &Name)
 
template<typename AttrType >
ENGINE_API int32 NumAttributeValues (FName AttributeName) const
 
template<typename AttrType >
ENGINE_API AttrType GetAttributeValue (int32 Index, const FName &Name) const
 
template<typename AttrType >
ENGINE_API void SetAttributeValue (int32 Index, const AttrType &Value, const FName &Name)
 
template<typename AttrType >
ENGINE_API bool CreateAttributeChannel (FName AttributeName) const
 
template<typename AttrType >
ENGINE_API int32 AddAttributeValue (float Param, const AttrType &Value, FName AttributeName) const
 
template<typename AttrType >
ENGINE_API void RemoveAttributeValue (int32 Index, FName AttributeName)
 
template<typename AttrType >
ENGINE_API AttrType EvaluateAttribute (float Param, FName AttributeName) const
 
ENGINE_API float FindNearest (const FVector &InLocation, float &OutSquaredDist) const
 
ENGINE_API float FindNearestOnSegment (const FVector &InLocation, int32 SegmentIndex, float &OutSquaredDist) const
 
ENGINE_API bool operator== (const FSpline &Other) const
 
bool operator!= (const FSpline &Other) const
 
ENGINE_API bool Serialize (FArchive &Ar)
 
ENGINE_API void SerializeLoad (FArchive &Ar)
 
ENGINE_API void SerializeSave (FArchive &Ar) const
 
ENGINE_API bool ExportTextItem (FString &ValueStr, FSpline const &DefaultValue, class UObject *Parent, int32 PortFlags, class UObject *ExportRootScope) const
 
ENGINE_API bool ImportTextItem (const TCHAR *&Buffer, int32 PortFlags, UObject *Parent, FOutputDevice *ErrorText)
 
uint32 GetVersion () const
 
ENGINE_API const FInterpCurveVectorGetSplinePointsPosition () const
 
ENGINE_API const FInterpCurveQuatGetSplinePointsRotation () const
 
ENGINE_API const FInterpCurveVectorGetSplinePointsScale () const
 
ENGINE_API float GetSegmentLength (const int32 Index, const float Param, const FVector &Scale3D=FVector(1.0f)) const
 
ENGINE_API float GetSplineLength () const
 
ENGINE_API int32 GetNumSegments () const
 
ENGINE_API int32 GetNumControlPoints () const
 
ENGINE_API void Reset ()
 
ENGINE_API void ResetRotation ()
 
ENGINE_API void ResetScale ()
 
ENGINE_API void SetClosedLoop (bool bClosed)
 
ENGINE_API bool IsClosedLoop () const
 
ENGINE_API void UpdateSpline (const FUpdateSplineParams &InParams)
 
ENGINE_API void UpdateSpline ()
 
ENGINE_API TSharedPtr< UE::Geometry::Spline::TSplineInterface< FVector > > GetSplineInterface () const
 
template<typename AttrType >
float GetAttributeParameter (int32 Index, const FName &Name) const
 
template<typename AttrType >
int32 SetAttributeParameter (int32 Index, float Parameter, const FName &Name)
 
template<typename AttrType >
int32 NumAttributeValues (FName AttributeName) const
 
template<typename AttrType >
AttrType GetAttributeValue (int32 Index, const FName &Name) const
 
template<typename AttrType >
void SetAttributeValue (int32 Index, const AttrType &Value, const FName &Name)
 
template<typename AttrType >
bool CreateAttributeChannel (FName AttributeName) const
 
template<typename AttrType >
int32 AddAttributeValue (float Param, const AttrType &Value, FName AttributeName) const
 
template<typename AttrType >
void RemoveAttributeValue (int32 Index, FName AttributeName)
 
template<typename AttrType >
AttrType EvaluateAttribute (float Param, FName AttributeName) const
 

Static Public Member Functions

static bool IsEnabledStatic ()
 

Friends

class USplineComponent
 
struct FPCGSplineStruct
 
FArchiveoperator<< (FArchive &Ar, FSpline &Spline)
 

Detailed Description

A general purpose, reflected spline. The implementation can be configured at runtime.

Constructor & Destructor Documentation

◆ FSpline() [1/2]

FSpline::FSpline ( )

FSpline Implementation

◆ FSpline() [2/2]

FSpline::FSpline ( const FSpline Other)

◆ ~FSpline()

FSpline::~FSpline ( )

Member Function Documentation

◆ AddAttributeValue() [1/2]

template<typename AttrType >
ENGINE_API int32 FSpline::AddAttributeValue ( float  Param,
const AttrType &  Value,
FName  AttributeName 
) const

◆ AddAttributeValue() [2/2]

template<typename AttrType >
int32 FSpline::AddAttributeValue ( float  Param,
const AttrType &  Value,
FName  AttributeName 
) const

◆ AddPoint()

void FSpline::AddPoint ( const FSplinePoint InPoint)

Adds point by parameter. The new point is inserted after all points with parameter values less than OR EQUAL to the new point's parameter. Nick would like to change this behavior in the future. See UE-250236.

◆ CreateAttributeChannel() [1/2]

template<typename AttrType >
ENGINE_API bool FSpline::CreateAttributeChannel ( FName  AttributeName) const

◆ CreateAttributeChannel() [2/2]

template<typename AttrType >
template ENGINE_API bool FSpline::CreateAttributeChannel< FVector > ( FName  AttributeName) const

◆ Evaluate()

FVector FSpline::Evaluate ( float  Param) const

◆ EvaluateAttribute() [1/2]

template<typename AttrType >
ENGINE_API AttrType FSpline::EvaluateAttribute ( float  Param,
FName  AttributeName 
) const

◆ EvaluateAttribute() [2/2]

template<typename AttrType >
template ENGINE_API FVector FSpline::EvaluateAttribute< FVector > ( float  Param,
FName  AttributeName 
) const

◆ EvaluateDerivative()

FVector FSpline::EvaluateDerivative ( float  Param) const

◆ EvaluateRotation()

FQuat FSpline::EvaluateRotation ( float  Param) const

◆ EvaluateScale()

FVector FSpline::EvaluateScale ( float  Param) const

◆ ExportTextItem()

bool FSpline::ExportTextItem ( FString &  ValueStr,
FSpline const &  DefaultValue,
class UObject Parent,
int32  PortFlags,
class UObject ExportRootScope 
) const

◆ FindNearest()

float FSpline::FindNearest ( const FVector InLocation,
float OutSquaredDist 
) const

◆ FindNearestOnSegment()

float FSpline::FindNearestOnSegment ( const FVector InLocation,
int32  SegmentIndex,
float OutSquaredDist 
) const

◆ GetAttributeParameter() [1/2]

template<typename AttrType >
ENGINE_API float FSpline::GetAttributeParameter ( int32  Index,
const FName Name 
) const

◆ GetAttributeParameter() [2/2]

template<typename AttrType >
template ENGINE_API float FSpline::GetAttributeParameter< FVector > ( int32  Index,
const FName Name 
) const

◆ GetAttributeValue() [1/2]

template<typename AttrType >
ENGINE_API AttrType FSpline::GetAttributeValue ( int32  Index,
const FName Name 
) const

◆ GetAttributeValue() [2/2]

template<typename AttrType >
template ENGINE_API FVector FSpline::GetAttributeValue< FVector > ( int32  Index,
const FName Name 
) const

◆ GetDistanceAtParameter()

float FSpline::GetDistanceAtParameter ( float  Parameter) const

◆ GetFloatPropertyChannels()

TArray< FName > FSpline::GetFloatPropertyChannels ( ) const

◆ GetInTangent()

FVector FSpline::GetInTangent ( const int32  Index) const

◆ GetLocation()

FVector FSpline::GetLocation ( const int32  Index) const

◆ GetNumControlPoints()

int32 FSpline::GetNumControlPoints ( ) const

Returns the total number of control points on this spline.

◆ GetNumSegments()

int32 FSpline::GetNumSegments ( ) const

Returns the total number of segments on this spline.

◆ GetOrientation() [1/2]

FQuat FSpline::GetOrientation ( float  Param) const

◆ GetOrientation() [2/2]

FQuat FSpline::GetOrientation ( int32  Index) const

◆ GetOutTangent()

FVector FSpline::GetOutTangent ( const int32  Index) const

◆ GetParameterAtDistance()

float FSpline::GetParameterAtDistance ( float  Distance) const

◆ GetParameterAtIndex()

float FSpline::GetParameterAtIndex ( int32  Index) const

◆ GetPoint()

FSplinePoint FSpline::GetPoint ( const int32  Index) const

◆ GetRotation()

FQuat FSpline::GetRotation ( const int32  Index) const

◆ GetScale()

FVector FSpline::GetScale ( const int32  Index) const

◆ GetSegmentLength()

float FSpline::GetSegmentLength ( const int32  Index,
const float  Param,
const FVector Scale3D = FVector(1.0f) 
) const

Returns the length of the specified spline segment up to the parametric value given

◆ GetSplineInterface()

TSharedPtr< UE::Geometry::Spline::TSplineInterface< FVector > > FSpline::GetSplineInterface ( ) const

◆ GetSplineLength()

float FSpline::GetSplineLength ( ) const

Returns total length along this spline

◆ GetSplinePointsPosition()

const FInterpCurveVector & FSpline::GetSplinePointsPosition ( ) const

◆ GetSplinePointsRotation()

const FInterpCurveQuat & FSpline::GetSplinePointsRotation ( ) const

◆ GetSplinePointsScale()

const FInterpCurveVector & FSpline::GetSplinePointsScale ( ) const

◆ GetSplinePointType()

EInterpCurveMode FSpline::GetSplinePointType ( int32  Index) const

◆ GetVectorPropertyChannels()

TArray< FName > FSpline::GetVectorPropertyChannels ( ) const

◆ GetVersion()

uint32 FSpline::GetVersion ( ) const
inline

◆ HasAttributeChannel()

bool FSpline::HasAttributeChannel ( FName  AttributeName) const

◆ ImportTextItem()

bool FSpline::ImportTextItem ( const TCHAR *&  Buffer,
int32  PortFlags,
UObject Parent,
FOutputDevice ErrorText 
)

◆ InsertPoint()

void FSpline::InsertPoint ( const FSplinePoint InPoint,
int32  Index 
)

Adds point by index. Provided parameter is ignored. The new point is inserted before all points with parameter values greater than the new point's parameter.

◆ IsClosedLoop()

bool FSpline::IsClosedLoop ( ) const

◆ IsEnabledStatic()

bool FSpline::IsEnabledStatic ( )
static

◆ NumAttributeValues() [1/2]

template<typename AttrType >
ENGINE_API int32 FSpline::NumAttributeValues ( FName  AttributeName) const

◆ NumAttributeValues() [2/2]

template<typename AttrType >
template ENGINE_API int32 FSpline::NumAttributeValues< FVector > ( FName  AttributeName) const

◆ operator!=()

bool FSpline::operator!= ( const FSpline Other) const
inline

◆ operator=() [1/2]

FSpline & FSpline::operator= ( const FSpline Other)

◆ operator=() [2/2]

FSpline & FSpline::operator= ( const FSplineCurves Other)

◆ operator==()

bool FSpline::operator== ( const FSpline Other) const

◆ RemoveAttributeChannel()

bool FSpline::RemoveAttributeChannel ( FName  AttributeName) const

◆ RemoveAttributeValue() [1/2]

template<typename AttrType >
ENGINE_API void FSpline::RemoveAttributeValue ( int32  Index,
FName  AttributeName 
)

◆ RemoveAttributeValue() [2/2]

template<typename AttrType >
template ENGINE_API void FSpline::RemoveAttributeValue< FVector > ( int32  Index,
FName  AttributeName 
)

◆ RemovePoint()

void FSpline::RemovePoint ( const int32  Index)

◆ Reset()

void FSpline::Reset ( )

Reset the spline to an empty spline.

◆ ResetRotation()

void FSpline::ResetRotation ( )

Reset the rotation attribute channel to default values.

◆ ResetScale()

void FSpline::ResetScale ( )

Reset the scale attribute channel to default values.

◆ Serialize()

bool FSpline::Serialize ( FArchive Ar)

◆ SerializeLoad()

void FSpline::SerializeLoad ( FArchive Ar)

◆ SerializeSave()

void FSpline::SerializeSave ( FArchive Ar) const

◆ SetAttributeParameter() [1/2]

template<typename AttrType >
ENGINE_API int32 FSpline::SetAttributeParameter ( int32  Index,
float  Parameter,
const FName Name 
)

◆ SetAttributeParameter() [2/2]

template<typename AttrType >
template ENGINE_API int32 FSpline::SetAttributeParameter< FVector > ( int32  Index,
float  Parameter,
const FName Name 
)

◆ SetAttributeValue() [1/2]

template<typename AttrType >
ENGINE_API void FSpline::SetAttributeValue ( int32  Index,
const AttrType &  Value,
const FName Name 
)

◆ SetAttributeValue() [2/2]

template<typename AttrType >
void FSpline::SetAttributeValue ( int32  Index,
const AttrType &  Value,
const FName Name 
)

◆ SetClosedLoop()

void FSpline::SetClosedLoop ( bool  bClosed)

◆ SetInTangent()

void FSpline::SetInTangent ( const int32  Index,
const FVector InTangent 
)

◆ SetLocation()

void FSpline::SetLocation ( int32  Index,
const FVector InLocation 
)

◆ SetOrientation()

void FSpline::SetOrientation ( int32  Index,
const FQuat InOrientation 
)

◆ SetOutTangent()

void FSpline::SetOutTangent ( const int32  Index,
const FVector OutTangent 
)

◆ SetRotation()

void FSpline::SetRotation ( int32  Index,
const FQuat InRotation 
)

◆ SetScale()

void FSpline::SetScale ( int32  Index,
const FVector InScale 
)

◆ SetSplinePointType()

void FSpline::SetSplinePointType ( int32  Index,
EInterpCurveMode  Type 
)

◆ SupportsAttributes()

bool FSpline::SupportsAttributes ( ) const
inline

◆ UpdateSpline() [1/2]

void FSpline::UpdateSpline ( )

Update the spline's internal data according to the most recently used update params (or default params if never updated).

◆ UpdateSpline() [2/2]

void FSpline::UpdateSpline ( const FUpdateSplineParams InParams)

Update the spline's internal data according to the passed-in params.

Friends And Related Symbol Documentation

◆ FPCGSplineStruct

friend struct FPCGSplineStruct
friend

◆ operator<<

FArchive & operator<< ( FArchive Ar,
FSpline Spline 
)
friend

◆ USplineComponent

friend class USplineComponent
friend

Member Data Documentation

◆ LegacyData

TSharedPtr<FLegacySpline> FSpline::LegacyData

◆ NewData

TSharedPtr<FNewSpline> FSpline::NewData

The documentation for this struct was generated from the following files: