![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <BSpline.h>
Inheritance diagram for UE::Geometry::Spline::TBSpline< VALUETYPE, DEGREE >:Classes | |
| struct | FValidKnotSearchParams |
| struct | THasToString |
| struct | THasToString< T, std::void_t< decltype(std::declval< T >().ToString())> > |
Public Types | |
| using | ValueType = typename TSplineInterface< VALUETYPE >::ValueType |
| using | FWindow = TStaticArray< const ValueType *, WindowSize > |
Public Types inherited from UE::Geometry::Spline::TSplineInterface< VALUETYPE > | |
| typedef VALUETYPE | ValueType |
Static Public Attributes | |
| static constexpr int32 | Degree = DEGREE |
| static constexpr int32 | WindowSize = Degree + 1 |
Protected Member Functions | |
| void | SetKnot (int32 KnotIdx, float NewValue) |
| bool | RemoveKnot (int32 KnotIdx) |
| void | SwapKnots (int32 KnotIdxA, int32 KnotIdxB) |
| bool | InsertKnot (FKnot InKnot) |
| float | GetNearestAvailableKnotValue (const FValidKnotSearchParams &InSearchParams) const |
| virtual int32 | GetExpectedNumKnots () const |
| void | GenerateUniformKnots (int32 KnotCount) |
| void | GenerateChordLengthKnots (int32 KnotCount) |
| void | GenerateCentripetalKnots (int32 KnotCount) |
| void | ApplyClampedKnotsMultiplicity () |
| void | UpdateFlatKnotsCache () const |
| void | MarkFlatKnotsCacheDirty () const |
| void | PrintKnotVector () const |
Protected Member Functions inherited from UE::Geometry::Spline::TSplineInterface< VALUETYPE > | |
| float | HandleOutOfBounds (float Parameter) const |
Protected Attributes | |
| TArray< ValueType > | Values |
| TArray< FKnot > | PairKnots |
| TArray< float > | FlatKnots |
| bool | bFlatKnotsCacheDirty |
| bool | bIsClosedLoop = false |
| bool | bClampEnds = true |
Protected Attributes inherited from UE::Geometry::Spline::TSplineInterface< VALUETYPE > | |
| EOutOfBoundsHandlingMode | PreInfinityMode = EOutOfBoundsHandlingMode::Zero |
| EOutOfBoundsHandlingMode | PostInfinityMode = EOutOfBoundsHandlingMode::Zero |
Friends | |
| FArchive & | operator<< (FArchive &Ar, TBSpline &BSpline) |
Additional Inherited Members | |
Static Public Member Functions inherited from UE::Geometry::Spline::TSplineInterface< VALUETYPE > | |
| static void | SetTypeName (const FString &InTypeName) |
| using UE::Geometry::Spline::TBSpline< VALUETYPE, DEGREE >::FWindow = TStaticArray<const ValueType*, WindowSize> |
| using UE::Geometry::Spline::TBSpline< VALUETYPE, DEGREE >::ValueType = typename TSplineInterface<VALUETYPE>::ValueType |
|
default |
|
overridevirtualdefault |
|
inline |
|
inlineprotected |
Applies clamped multiplicity to the knot vector. This ensures that the first and last knots have Degree + 1 multiplicity
|
inlineoverridevirtual |
Implements UE::Geometry::Spline::ISplineInterface.
Reimplemented in UE::Geometry::Spline::TPolyBezierSpline< VALUETYPE >.
|
inlineoverridevirtual |
Implements UE::Geometry::Spline::ISplineInterface.
Reimplemented in UE::Geometry::Spline::TPolyBezierSpline< VALUETYPE >.
| UE::Geometry::Spline::TBSpline< VALUETYPE, DEGREE >::DECLARE_SPLINE_TYPE_ID | ( | BSplineNameSelector< DEGREE >::Name | , |
| *TSplineValueTypeTraits< VALUETYPE >::Name | |||
| ) |
|
inline |
|
inlineoverridevirtual |
Implementation of evaluate with parameter handling
Implements UE::Geometry::Spline::TSplineInterface< VALUETYPE >.
|
inlinevirtual |
Reimplemented in UE::Geometry::Spline::TPolyBezierSpline< VALUETYPE >.
|
inlineoverridevirtual |
Finds the nearest parameter value to a point
| Point | The point to find nearest to |
| OutSquaredDistance | The squared distance to the nearest point |
Implements UE::Geometry::Spline::TSplineInterface< VALUETYPE >.
Reimplemented in UE::Geometry::Spline::TPolyBezierSpline< VALUETYPE >.
|
inlineprotected |
Generates a knot vector using centripetal parameterization Uses square root of chord lengths which helps prevent cusps and unwanted loops Often provides the most visually pleasing results for interactive curve editing
|
inlineprotected |
Generates a knot vector based on chord lengths between control points This gives better parameterization when control points are unevenly spaced
|
inlineprotected |
Generates a uniform knot vector with equal spacing For clamped ends, multiplicity of degree+1 is used at endpoints
|
inlineprotectedvirtual |
Reimplemented in UE::Geometry::Spline::TPolyBezierSpline< VALUETYPE >.
|
inline |
Returns how many times a given knot value appears.
| KnotIndex | - Knot value to check |
|
inline |
|
inline |
|
inlineprotected |
Finds the nearest available knot value that does not conflict with existing knots.
| InSearchParams | - Describes value to search for and how to search. |
|
inlineoverridevirtual |
Returns the number of Bezier segments in the spline
Implements UE::Geometry::Spline::ISplineInterface.
Reimplemented in UE::Geometry::Spline::TPolyBezierSpline< VALUETYPE >.
|
inline |
|
inlinevirtual |
Reimplemented in UE::Geometry::Spline::TLinearSpline< T >, and UE::Geometry::Spline::TPolyBezierSpline< VALUETYPE >.
|
inlineoverridevirtual |
Implements UE::Geometry::Spline::ISplineInterface.
Reimplemented in UE::Geometry::Spline::TPolyBezierSpline< VALUETYPE >.
|
inlineoverridevirtual |
Maps a segment index to its parameter range
| SegmentIndex | - Index of the segment (0-based) |
Implements UE::Geometry::Spline::ISplineInterface.
Reimplemented in UE::Geometry::Spline::TPolyBezierSpline< VALUETYPE >.
|
inline |
|
inlineprotected |
Inserts a knot at the specified parameter value
| InKnot | - Knot to insert |
|
inline |
|
inline |
|
inlineoverridevirtual |
Implements UE::Geometry::Spline::ISplineInterface.
|
inlineoverridevirtual |
Implements UE::Geometry::Spline::ISplineInterface.
|
inlineprotected |
Marks the flat knots cache as dirty.
|
inline |
|
inline |
|
inlineprotected |
Prints the knot vector to the log for debugging.
|
inlineprotected |
Removes a knot at the specified index.
| KnotIdx | - Index of the knot to remove |
|
inlinevirtual |
|
inlinevirtual |
Updates the knot vector based on current control points and settings
| Points | - Array of control points and their Knots |
| ParameterizationPolicy | - Policy for generating knot vector |
Reimplemented in UE::Geometry::Spline::TPolyBezierSpline< VALUETYPE >.
|
inline |
|
inlineoverridevirtual |
Serializes the spline
Reimplemented from UE::Geometry::Spline::TSplineInterface< VALUETYPE >.
|
inline |
Sets whether the spline should be clamped at endpoints When true, the curve will interpolate the first and last control points
|
inlineoverridevirtual |
Implements UE::Geometry::Spline::ISplineInterface.
Reimplemented in UE::Geometry::Spline::TPolyBezierSpline< VALUETYPE >.
|
inline |
Sets a custom knot vector using explicit knot/multiplicity pairs
| NewKnots | - Array of knot values. Must be non-decreasing and have correct length (see GetExpectedNumKnots) |
|
inlineprotected |
Sets the value of a knot
| KnotIdx | - Index of the knot to set |
| NewValue | - Value to set |
|
inlinevirtual |
Reimplemented in UE::Geometry::Spline::TLinearSpline< T >, and UE::Geometry::Spline::TPolyBezierSpline< VALUETYPE >.
|
inline |
|
inlineprotected |
Swaps two knots.
| KnotIdxA | - Index of first knot to swap. |
| KnotIdxB | - Index of second knot to swap. |
|
inlineprotected |
Updates the flat knot cache from the pair representation if the cache is dirty.
|
protected |
Whether to clamp the endpoints for interpolation of first/last control points
|
mutableprotected |
|
protected |
|
staticconstexpr |
|
mutableprotected |
|
protected |
|
protected |
|
staticconstexpr |