UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE > Class Template Reference

#include <TangentBezierSpline.h>

+ Inheritance diagram for UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >:

Public Types

typedef TSplineWrapper< TPolyBezierSpline< VALUETYPE > >::ValueType ValueType
 
using FTangentBezierControlPoint = TTangentBezierControlPoint< ValueType >
 
- Public Types inherited from UE::Geometry::Spline::TSplineWrapper< TPolyBezierSpline< VALUETYPE > >
typedef TPolyBezierSpline< VALUETYPESplineType
 
typedef SplineType::ValueType ValueType
 
- Public Types inherited from UE::Geometry::Spline::TSplineInterface< SPLINETYPE::ValueType >
typedef SPLINETYPE::ValueType ValueType
 

Public Member Functions

 DECLARE_SPLINE_TYPE_ID (TEXT("TangentBezier"), *TSplineValueTypeTraits< VALUETYPE >::Name)
 
 TTangentBezierSpline ()=default
 
virtual ~TTangentBezierSpline () override=default
 
 TTangentBezierSpline (const ValueType &StartPoint, const ValueType &EndPoint)
 
 TTangentBezierSpline (const ValueType &StartPoint, const ValueType &EndPoint, const ValueType &StartTangent, const ValueType &EndTangent, bool bAutoTangents=false)
 
 TTangentBezierSpline (const TTangentBezierSpline &Other)
 
TTangentBezierSplineoperator= (const TTangentBezierSpline &Other)
 
virtual bool IsEqual (const ISplineInterface *OtherSpline) const override
 
virtual bool Serialize (FArchive &Ar) override
 
bool operator== (const TTangentBezierSpline< ValueType > &Other) const
 
virtual TUniquePtr< ISplineInterfaceClone () const override
 
virtual bool IsClosedLoop () const override
 
virtual void SetClosedLoop (bool bInClosedLoop) override
 
bool SetControlPoints (const TArray< FTangentBezierControlPoint > &Points)
 
bool AddControlPoints (const TArray< FTangentBezierControlPoint > &Points, bool bAppend=true)
 
int32 InsertPointAtGlobalParam (float Parameter, const FTangentBezierControlPoint &ControlPoint)
 
int32 InsertPointAtSegmentParam (int32 SegmentIndex, float LocalT, const FTangentBezierControlPoint &ControlPoint, EParameterizationPolicy ParameterizationPolicy=EParameterizationPolicy::Centripetal)
 
int32 InsertPointAtPosition (int32 PointIndex, const FTangentBezierControlPoint &ControlPoint)
 
void PrependPoint (const FTangentBezierControlPoint &ControlPoint)
 
void AppendPoint (const FTangentBezierControlPoint &ControlPoint)
 
FTangentBezierControlPoint GetControlPoint (int32 Index) const
 
void RemovePoint (int32 Index)
 
void ModifyPoint (int32 Index, const FTangentBezierControlPoint &ControlPoint)
 
void SetValue (int32 Index, const ValueType &NewValue)
 
ValueType GetValue (float Parameter) const
 
ValueType GetValue (int32 Index) const
 
ValueType GetTangent (float Parameter) const
 
ValueType GetTangentIn (int32 Index) const
 
ValueType GetTangentOut (int32 Index) const
 
void SetTangentIn (int32 Index, const ValueType &NewTangent)
 
void SetTangentOut (int32 Index, const ValueType &NewTangent)
 
int32 GetNumPoints () const
 
virtual int32 GetNumberOfSegments () const override
 
virtual FInterval1f GetSegmentParameterRange (int32 SegmentIndex) const override
 
bool IsAutoTangent (int32 Index) const
 
void SetPointTangentMode (int32 Index, ETangentMode Mode)
 
virtual void Clear () override
 
float GetParameter (int32 Index) const
 
int32 SetParameter (int32 Index, float NewParameter)
 
virtual FInterval1f GetParameterSpace () const override
 
int32 FindSegmentIndex (float Parameter, float &OutLocalParam) const
 
void UpdateTangents ()
 
void UpdatePointTangents (int32 Index, ETangentMode Mode)
 
virtual float FindNearest (const ValueType &Point, float &OutSquaredDistance) const override
 
void Reparameterize (EParameterizationPolicy Policy=EParameterizationPolicy::Centripetal)
 
void SetKnotVector (const TArray< FKnot > &InKnots)
 
const TArray< FKnot > & GetKnotVector () const
 
const FPolyBezierSpline3dGetInternalSpline () const
 
float GetTension () const
 
void SetTension (const float InTension)
 
ETangentMode GetTangentMode (int32 Index) const
 
void SetTangentModes (const TArray< ETangentMode > &InTangentModes)
 
const TArray< ETangentMode > & GetTangentModes () const
 
void SetStationaryEndpoints (bool bInStationaryEndpoints)
 
bool IsStationaryEndpoints () const
 
float FindNearestOnSegment (const ValueType &Point, int32 SegmentIndex, float &OutSquaredDistance) const
 
- Public Member Functions inherited from UE::Geometry::Spline::TSplineWrapper< TPolyBezierSpline< VALUETYPE > >
virtual ~TSplineWrapper () override=default
 
virtual FString GetValueTypeName () const override
 
virtual FString GetImplementationName () const override
 
virtual void SetPreInfinityMode (EOutOfBoundsHandlingMode InMode) override
 
virtual void SetPostInfinityMode (EOutOfBoundsHandlingMode InMode) override
 
virtual EOutOfBoundsHandlingMode GetPreInfinityMode () const override
 
virtual EOutOfBoundsHandlingMode GetPostInfinityMode () const override
 
virtual ValueType EvaluateImpl (float Parameter) const override
 
virtual float FindNearest (const ValueType &Point, float &OutSquaredDistance) const override
 
- Public Member Functions inherited from UE::Geometry::Spline::TSplineInterface< SPLINETYPE::ValueType >
 TSplineInterface ()
 
virtual ~TSplineInterface () override=default
 
ValueType Evaluate (float Parameter) const
 
virtual float FindNearest (const ValueType &Point, float &OutSquaredDistance) const=0
 
virtual FSplineTypeId::IdType GetTypeId () const override
 
- Public Member Functions inherited from UE::Geometry::Spline::ISplineInterface
virtual ~ISplineInterface ()=default
 

Static Public Member Functions

static TTangentBezierSpline CreateLine (const ValueType &StartPoint, const ValueType &EndPoint)
 
static TTangentBezierSpline CreateCircleArc (const ValueType &Center, float Radius, float StartAngle, float EndAngle, int32 NumSegments=4)
 
static TTangentBezierSpline CreateCircle (const ValueType &Center, float Radius, int32 NumSegments=4)
 
static TTangentBezierSpline CreateEllipse (const ValueType &Center, float RadiusX, float RadiusY, int32 NumSegments=4)
 
- Static Public Member Functions inherited from UE::Geometry::Spline::TSplineInterface< SPLINETYPE::ValueType >
static void SetTypeName (const FString &InTypeName)
 

Protected Member Functions

void UpdateBezierControlPoint (int32 Index, const ValueType &NewValue)
 
- Protected Member Functions inherited from UE::Geometry::Spline::TSplineInterface< SPLINETYPE::ValueType >
float HandleOutOfBounds (float Parameter) const
 

Protected Attributes

float Tension = 0.0f
 
TArray< ETangentModeTangentModes
 
bool bStationaryEndpoint = false
 
- Protected Attributes inherited from UE::Geometry::Spline::TSplineWrapper< TPolyBezierSpline< VALUETYPE > >
SplineType InternalSpline
 
- Protected Attributes inherited from UE::Geometry::Spline::TSplineInterface< SPLINETYPE::ValueType >
EOutOfBoundsHandlingMode PreInfinityMode
 
EOutOfBoundsHandlingMode PostInfinityMode
 

Friends

FArchiveoperator<< (FArchive &Ar, TTangentBezierSpline &Spline)
 

Detailed Description

template<typename VALUETYPE>
class UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >

A spline that provides tangent-based control over curve shape while using piecewise Bezier curves internally for evaluation. Supports both manual tangent control and automatic tangent computation.

Member Typedef Documentation

◆ FTangentBezierControlPoint

◆ ValueType

Constructor & Destructor Documentation

◆ TTangentBezierSpline() [1/4]

template<typename VALUETYPE >
UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::TTangentBezierSpline ( )
default

◆ ~TTangentBezierSpline()

◆ TTangentBezierSpline() [2/4]

template<typename VALUETYPE >
UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::TTangentBezierSpline ( const ValueType StartPoint,
const ValueType EndPoint 
)
inline

Default constructor with at least one segment

◆ TTangentBezierSpline() [3/4]

template<typename VALUETYPE >
UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::TTangentBezierSpline ( const ValueType StartPoint,
const ValueType EndPoint,
const ValueType StartTangent,
const ValueType EndTangent,
bool  bAutoTangents = false 
)
inline

Constructor with full control over tangents

◆ TTangentBezierSpline() [4/4]

template<typename VALUETYPE >
UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::TTangentBezierSpline ( const TTangentBezierSpline< VALUETYPE > &  Other)
inline

Copy constructor

Member Function Documentation

◆ AddControlPoints()

template<typename VALUETYPE >
bool UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::AddControlPoints ( const TArray< FTangentBezierControlPoint > &  Points,
bool  bAppend = true 
)
inline

Adds multiple points to the spline.

Parameters
Points- Array of control points to add
bAppend- If true, append to the end of spline; if false, prepend to the beginning
Returns
True if the points were successfully added

◆ AppendPoint()

template<typename VALUETYPE >
void UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::AppendPoint ( const FTangentBezierControlPoint ControlPoint)
inline

Appends a control point to the end of the spline.

Parameters
ControlPointStructure containing position and tangent information

◆ Clear()

◆ Clone()

◆ CreateCircle()

template<typename VALUETYPE >
static TTangentBezierSpline UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::CreateCircle ( const ValueType Center,
float  Radius,
int32  NumSegments = 4 
)
inlinestatic

Creates a complete circle

Parameters
Center- Center point of the circle
Radius- Radius of the circle
NumSegments- Number of segments to use (more segments = smoother curve)
Returns
New TangentBezierSpline initialized as a circle

◆ CreateCircleArc()

template<typename VALUETYPE >
static TTangentBezierSpline UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::CreateCircleArc ( const ValueType Center,
float  Radius,
float  StartAngle,
float  EndAngle,
int32  NumSegments = 4 
)
inlinestatic

Creates a circular arc with specified parameters

Parameters
Center- Center point of the circle
Radius- Radius of the circle
StartAngle- Start angle in radians
EndAngle- End angle in radians
NumSegments- Number of segments to use (more segments = smoother curve)
Returns
New TangentBezierSpline initialized as an arc

◆ CreateEllipse()

template<typename VALUETYPE >
static TTangentBezierSpline UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::CreateEllipse ( const ValueType Center,
float  RadiusX,
float  RadiusY,
int32  NumSegments = 4 
)
inlinestatic

Creates an ellipse with specified parameters

Parameters
Center- Center point of the ellipse
RadiusX- Radius along X axis
RadiusY- Radius along Y axis
NumSegments- Number of segments to use (more segments = smoother curve)
Returns
New TangentBezierSpline initialized as an ellipse

◆ CreateLine()

template<typename VALUETYPE >
static TTangentBezierSpline UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::CreateLine ( const ValueType StartPoint,
const ValueType EndPoint 
)
inlinestatic

Creates a straight line between two points

Parameters
StartPoint- Start point of the line
EndPoint- End point of the line
Returns
New TangentBezierSpline initialized as a line

◆ DECLARE_SPLINE_TYPE_ID()

template<typename VALUETYPE >
UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::DECLARE_SPLINE_TYPE_ID ( TEXT("TangentBezier")  ,
*TSplineValueTypeTraits< VALUETYPE >::Name   
)

◆ FindNearest()

template<typename VALUETYPE >
virtual float UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::FindNearest ( const ValueType Point,
float OutSquaredDistance 
) const
inlineoverridevirtual

◆ FindNearestOnSegment()

template<typename VALUETYPE >
float UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::FindNearestOnSegment ( const ValueType Point,
int32  SegmentIndex,
float OutSquaredDistance 
) const
inline

◆ FindSegmentIndex()

template<typename VALUETYPE >
int32 UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::FindSegmentIndex ( float  Parameter,
float OutLocalParam 
) const
inline

◆ GetControlPoint()

Gets the control point at the specified index

Parameters
IndexIndex of the point to retrieve
Returns
Control point structure with position and tangent information

◆ GetInternalSpline()

template<typename VALUETYPE >
const FPolyBezierSpline3d & UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::GetInternalSpline ( ) const
inline

Getter for internal spline

◆ GetKnotVector()

template<typename VALUETYPE >
const TArray< FKnot > & UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::GetKnotVector ( ) const
inline

◆ GetNumberOfSegments()

◆ GetNumPoints()

template<typename VALUETYPE >
int32 UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::GetNumPoints ( ) const
inline

Gets the number of points in the spline

◆ GetParameter()

template<typename VALUETYPE >
float UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::GetParameter ( int32  Index) const
inline

◆ GetParameterSpace()

◆ GetSegmentParameterRange()

template<typename VALUETYPE >
virtual FInterval1f UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::GetSegmentParameterRange ( int32  SegmentIndex) const
inlineoverridevirtual

◆ GetTangent()

template<typename VALUETYPE >
ValueType UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::GetTangent ( float  Parameter) const
inline

Gets tangent at parameter in spline space

◆ GetTangentIn()

template<typename VALUETYPE >
ValueType UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::GetTangentIn ( int32  Index) const
inline

Gets incoming tangent for the specified point

◆ GetTangentMode()

template<typename VALUETYPE >
ETangentMode UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::GetTangentMode ( int32  Index) const
inline

◆ GetTangentModes()

template<typename VALUETYPE >
const TArray< ETangentMode > & UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::GetTangentModes ( ) const
inline

◆ GetTangentOut()

template<typename VALUETYPE >
ValueType UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::GetTangentOut ( int32  Index) const
inline

Gets outgoing tangent for the specified point

◆ GetTension()

template<typename VALUETYPE >
float UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::GetTension ( ) const
inline

◆ GetValue() [1/2]

template<typename VALUETYPE >
ValueType UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::GetValue ( float  Parameter) const
inline

Gets position at specified parent space parameter

◆ GetValue() [2/2]

template<typename VALUETYPE >
ValueType UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::GetValue ( int32  Index) const
inline

Gets the value of the specified point

◆ InsertPointAtGlobalParam()

template<typename VALUETYPE >
int32 UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::InsertPointAtGlobalParam ( float  Parameter,
const FTangentBezierControlPoint ControlPoint 
)
inline

Inserts a new point at the specified parameter along the spline.

Parameters
Parameter- Parameter value where to insert the point (Spline Space)
ControlPoint- Control point to insert
Returns
The index of the newly created point

◆ InsertPointAtPosition()

template<typename VALUETYPE >
int32 UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::InsertPointAtPosition ( int32  PointIndex,
const FTangentBezierControlPoint ControlPoint 
)
inline

Inserts a new point at the specified parameter along the spline.

Parameters
PointIndex- Index of the new Point
ControlPoint- Control point to insert
Returns
The index of the newly created point

◆ InsertPointAtSegmentParam()

template<typename VALUETYPE >
int32 UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::InsertPointAtSegmentParam ( int32  SegmentIndex,
float  LocalT,
const FTangentBezierControlPoint ControlPoint,
EParameterizationPolicy  ParameterizationPolicy = EParameterizationPolicy::Centripetal 
)
inline

Inserts a point at a specific segment with local parameter. This splits the segment at the specified location and places the new point at the provided position, which may change the spline shape.

Parameters
SegmentIndexIndex of the segment to split
LocalTLocal parameter [0,1] within the segment
PositionPosition for the new point
ParameterizationPolicyHow to distribute parameters
Returns
The index of the newly created point

◆ IsAutoTangent()

template<typename VALUETYPE >
bool UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::IsAutoTangent ( int32  Index) const
inline

Checks if a point's tangents are automatically computed

◆ IsClosedLoop()

◆ IsEqual()

◆ IsStationaryEndpoints()

template<typename VALUETYPE >
bool UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::IsStationaryEndpoints ( ) const
inline

◆ ModifyPoint()

template<typename VALUETYPE >
void UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::ModifyPoint ( int32  Index,
const FTangentBezierControlPoint ControlPoint 
)
inline

Modifies an existing point

Parameters
Index- Index of the point to modify
ControlPoint- New control point data

◆ operator=()

Copy assignment

◆ operator==()

template<typename VALUETYPE >
bool UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::operator== ( const TTangentBezierSpline< ValueType > &  Other) const
inline

◆ PrependPoint()

template<typename VALUETYPE >
void UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::PrependPoint ( const FTangentBezierControlPoint ControlPoint)
inline

Helper method to prepend a point to the spline.

Parameters
ControlPointControl point structure to prepend
Returns
Index of the new point

◆ RemovePoint()

template<typename VALUETYPE >
void UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::RemovePoint ( int32  Index)
inline

Removes a point from the spline

Parameters
Index- Index of the point to remove

◆ Reparameterize()

template<typename VALUETYPE >
void UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::Reparameterize ( EParameterizationPolicy  Policy = EParameterizationPolicy::Centripetal)
inline

◆ Serialize()

template<typename VALUETYPE >
virtual bool UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::Serialize ( FArchive Ar)
inlineoverridevirtual

◆ SetClosedLoop()

◆ SetControlPoints()

template<typename VALUETYPE >
bool UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::SetControlPoints ( const TArray< FTangentBezierControlPoint > &  Points)
inline

Replaces all points in the spline with the provided points.

Parameters
Points- Array of control points to set
Returns
True if the points were successfully set

◆ SetKnotVector()

template<typename VALUETYPE >
void UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::SetKnotVector ( const TArray< FKnot > &  InKnots)
inline

◆ SetParameter()

template<typename VALUETYPE >
int32 UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::SetParameter ( int32  Index,
float  NewParameter 
)
inline

◆ SetPointTangentMode()

template<typename VALUETYPE >
void UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::SetPointTangentMode ( int32  Index,
ETangentMode  Mode 
)
inline

Sets the tangent mode for a specific point

Parameters
Index- Index of the point
Mode- New tangent mode to set

◆ SetStationaryEndpoints()

template<typename VALUETYPE >
void UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::SetStationaryEndpoints ( bool  bInStationaryEndpoints)
inline

◆ SetTangentIn()

template<typename VALUETYPE >
void UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::SetTangentIn ( int32  Index,
const ValueType NewTangent 
)
inline

Sets tangent in for the specified point

◆ SetTangentModes()

template<typename VALUETYPE >
void UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::SetTangentModes ( const TArray< ETangentMode > &  InTangentModes)
inline

◆ SetTangentOut()

template<typename VALUETYPE >
void UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::SetTangentOut ( int32  Index,
const ValueType NewTangent 
)
inline

Sets tangent out for the specified point

◆ SetTension()

template<typename VALUETYPE >
void UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::SetTension ( const float  InTension)
inline

◆ SetValue()

template<typename VALUETYPE >
void UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::SetValue ( int32  Index,
const ValueType NewValue 
)
inline

◆ UpdateBezierControlPoint()

template<typename VALUETYPE >
void UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::UpdateBezierControlPoint ( int32  Index,
const ValueType NewValue 
)
inlineprotected

Updates a Bezier control point in the internal spline

◆ UpdatePointTangents()

template<typename VALUETYPE >
void UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::UpdatePointTangents ( int32  Index,
ETangentMode  Mode 
)
inline

Updates tangents for a specific point based on its tangent mode

Parameters
IndexIndex of the point to update
ModeTangent mode to apply

◆ UpdateTangents()

Updates tangents for all control points based on their tangent modes

Friends And Related Symbol Documentation

◆ operator<<

template<typename VALUETYPE >
FArchive & operator<< ( FArchive Ar,
TTangentBezierSpline< VALUETYPE > &  Spline 
)
friend

Member Data Documentation

◆ bStationaryEndpoint

template<typename VALUETYPE >
bool UE::Geometry::Spline::TTangentBezierSpline< VALUETYPE >::bStationaryEndpoint = false
protected

◆ TangentModes

◆ Tension


The documentation for this class was generated from the following file: