UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TSpring1D< FloatType > Class Template Reference

#include <SlateSprings.h>

Classes

class  FSpringConfig
 

Public Member Functions

 TSpring1D ()
 
 TSpring1D (FloatType InPosition)
 
void SetConfig (const FSpringConfig &InConfig)
 
void SetPosition (FloatType InPosition)
 
FloatType GetPosition () const
 
void SetTarget (FloatType InTarget)
 
FloatType GetTarget () const
 
bool IsAtRest ()
 
void Tick (float InQuantum)
 

Detailed Description

template<typename FloatType>
class TSpring1D< FloatType >

One-dimensional spring simulation

Constructor & Destructor Documentation

◆ TSpring1D() [1/2]

template<typename FloatType >
TSpring1D< FloatType >::TSpring1D ( )
inline

Constructor

◆ TSpring1D() [2/2]

template<typename FloatType >
TSpring1D< FloatType >::TSpring1D ( FloatType  InPosition)
inline

Construct at specified position

Member Function Documentation

◆ GetPosition()

template<typename FloatType >
FloatType TSpring1D< FloatType >::GetPosition ( ) const
inline

Gets the current position of the spring

Returns
Current position for this spring

◆ GetTarget()

template<typename FloatType >
FloatType TSpring1D< FloatType >::GetTarget ( ) const
inline

Gets the target position

Returns
Target position for this spring

◆ IsAtRest()

template<typename FloatType >
bool TSpring1D< FloatType >::IsAtRest ( )
inline
Returns
True if the spring is at rest (i.e. at its target position)

◆ SetConfig()

template<typename FloatType >
void TSpring1D< FloatType >::SetConfig ( const FSpringConfig InConfig)
inline

Sets the config for this spring

Parameters
InConfigNew configuration

◆ SetPosition()

template<typename FloatType >
void TSpring1D< FloatType >::SetPosition ( FloatType  InPosition)
inline

Sets the current position (and target position) for the spring

Parameters
InTargetNew position

◆ SetTarget()

template<typename FloatType >
void TSpring1D< FloatType >::SetTarget ( FloatType  InTarget)
inline

Sets the target position for the spring

Parameters
InTargetNew target position

◆ Tick()

template<typename FloatType >
void TSpring1D< FloatType >::Tick ( float  InQuantum)
inline

Updates the simulation. Should be called every tick!

Parameters
InQuantumTime passed since last update

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