Rtpc¶
class Rtpc : public Asset<AmRtpcID>
Amplitude Real-Time Parameter Control Asset.
A RTPC is a value that is updated by the game. Any update to the RTPC is listened by the engine to propagate the changes to other parameters linked to it.
A Rtpc object is shared between any objects and values linked to it.
Functions¶
Name | Description |
---|---|
Update | Updates the value of the RTPC. |
GetMinValue | Gets the minimum value of this RTPC. |
GetMaxValue | Gets the maximum value of this RTPC. |
GetValue | Gets the current value of this RTPC. |
SetValue | Sets the current value of this RTPC. |
GetDefaultValue | Gets the default value of this RTPC. |
Reset | Resets the current RTPC value to the default value. |
Function Details¶
GetDefaultValue¶
[[nodiscard]] virtual AmReal64 GetDefaultValue() const = 0
Gets the default value of this RTPC.
- Return
- The default RTPC value.
GetMaxValue¶
[[nodiscard]] virtual AmReal64 GetMaxValue() const = 0
Gets the maximum value of this RTPC.
- Return
- The RTPC maximum value.
GetMinValue¶
[[nodiscard]] virtual AmReal64 GetMinValue() const = 0
Gets the minimum value of this RTPC.
- Return
- The RTPC minimum value.
GetValue¶
[[nodiscard]] virtual AmReal64 GetValue() const = 0
Gets the current value of this RTPC.
- Return
- The current RTPC value.
Reset¶
virtual void Reset() = 0
Resets the current RTPC value to the default value.
SetValue¶
virtual void SetValue(AmReal64 value) = 0
Sets the current value of this RTPC.
- Parameter
value
- The value to set.
Update¶
virtual void Update(AmTime deltaTime) = 0
Updates the value of the RTPC.
This method is useful only for RTPCs that are using a curve to update their value.
- Parameter
deltaTime
- The time elapsed since the last update.