Navigation
API > API/Plugins > API/Plugins/GameplayCameras
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.
| Name | TConsumableValue |
| Type | struct |
| Header File | /Engine/Plugins/Cameras/GameplayCameras/Source/GameplayCameras/Public/Math/ConsumableValue.h |
| Include Path | #include "Math/ConsumableValue.h" |
Syntax
template<typename ValueType>
struct TConsumableValue
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Creates a new consumable with no value. | Math/ConsumableValue.h | ||
TConsumableValue
(
ValueType InValue, |
Creates a new consumable. | Math/ConsumableValue.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bHasValue | bool | Math/ConsumableValue.h | ||
| bIsDelta | bool | Math/ConsumableValue.h | ||
| Value | ValueType | Math/ConsumableValue.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ValueType Apply
(
const ValueType InTarget |
Applies the consumable to the given value and returns the new value. | Math/ConsumableValue.h | |
ValueType Apply
(
const ValueType InTarget, |
Applies the consumable to the given value and returns the new value. | Math/ConsumableValue.h | |
ValueType Get() |
Gets the current value. Asserts if there is no value. | Math/ConsumableValue.h | |
ValueType GetOrDefault
(
ValueType DefaultValue |
Gets the current value, or the default one if there's no value. | Math/ConsumableValue.h | |
bool HasValue() |
Returns whether there's any value left in the consumable. | Math/ConsumableValue.h | |
bool IsDelta() |
Returns whether the consumable is a delta. | Math/ConsumableValue.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static TConsumableValue< ValueType > Absolute
(
ValueType InValue |
Returns an absolute consumable with the given value. | Math/ConsumableValue.h | |
static TConsumableValue< ValueType > Delta
(
ValueType InValue |
Returns a delta consumable with the given value. | Math/ConsumableValue.h |