Navigation
API > API/Runtime > API/Runtime/SlateCore > API/Runtime/SlateCore/Animation
References
| Module | SlateCore |
| Header | /Engine/Source/Runtime/SlateCore/Public/Animation/SlateSprings.h |
| Include | #include "Animation/SlateSprings.h" |
Syntax
template<typename FloatType>
class TSpring1D
Remarks
One-dimensional spring simulation
Constructors
| Type | Name | Description | |
|---|---|---|---|
TSpring1D () |
Constructor | ||
TSpring1D
(
FloatType InPosition |
Construct at specified position |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FloatType | GetPosition () |
Gets the current position of the spring | |
| FloatType | GetTarget () |
Gets the target position | |
| bool | IsAtRest () |
||
| void | SetConfig
(
const FSpringConfig& InConfig |
Sets the config for this spring | |
| void | SetPosition
(
FloatType InPosition |
Sets the current position (and target position) for the spring | |
| void | SetTarget
(
FloatType InTarget |
Sets the target position for the spring | |
| void | Tick
(
float InQuantum |
Updates the simulation. Should be called every tick! |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FSpringConfig | Spring configuration |