Navigation
API > API/Plugins > API/Plugins/GameplayCameras > API/Plugins/GameplayCameras/Math
References
| Module | GameplayCameras |
| Header | /Engine/Plugins/Cameras/GameplayCameras/Source/GameplayCameras/Public/Math/ConsumableValue.h |
| Include | #include "Math/ConsumableValue.h" |
Syntax
template<typename ValueType>
struct TConsumableValue
Remarks
A value that can be "consumed" and applied to another value. The consumable value can be a "delta", which is added to another value, or an "absolute", which is set on another value.
Constructors
| Type | Name | Description | |
|---|---|---|---|
| Creates a new consumable with no value. | |||
TConsumableValue
(
ValueType InValue, |
Creates a new consumable. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| TConsumableValue< ValueType > | Absolute
(
ValueType InValue |
Returns an absolute consumable with the given value. | |
| ValueType | Apply
(
const ValueType InTarget |
Applies the consumable to the given value and returns the new value. | |
| ValueType | Apply
(
const ValueType InTarget, |
Applies the consumable to the given value and returns the new value. | |
| TConsumableValue< ValueType > | Delta
(
ValueType InValue |
Returns a delta consumable with the given value. | |
| ValueType | Get () |
Gets the current value. Asserts if there is no value. | |
| ValueType | GetOrDefault
(
ValueType DefaultValue |
Gets the current value, or the default one if there's no value. | |
| bool | HasValue () |
Returns whether there's any value left in the consumable. | |
| bool | IsDelta () |
Returns whether the consumable is a delta. |