Navigation
API > API/Plugins > API/Plugins/Learning
A FFrameAttribute represents a attribute associated with every frame in a FFrameRangeSet. An attribute is made up of multiple "channels" such as the X, Y, Z components of a location.
The data for the attribute is stored in one large flat array of shape (ChannelNum, TotalFrameNum). This means the data is stored in a way designed for SoA access by default. Some helper functions are provided for accessing slices of this data according to various range properties.
Also provided are many "operators" which allow for batched operations on attributes to create new attributes such as adding or subtracting attribute values. This operations are very efficient as they are computed across all frames in the attribute in batch and can be optimized using ISPC. If you perform a binary operation on two channels with different frames in the range sets then it will construct a new channel which is the intersection of those two inputs.
| Name | FFrameAttribute |
| Type | struct |
| Header File | /Engine/Plugins/Experimental/LearningAgents/Source/Learning/Public/LearningFrameAttribute.h |
| Include Path | #include "LearningFrameAttribute.h" |
Syntax
struct FFrameAttribute
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AttributeData | TLearningArray< 2, float > | The large flat array of attribute data of shape (ChannelNum, TotalFrameNum) | LearningFrameAttribute.h | |
| FrameRangeSet | FFrameRangeSet | The internal associate FrameRangeSet | LearningFrameAttribute.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Check() |
Check if the FrameAttribute is well-formed. | LearningFrameAttribute.h | |
void Empty() |
Empties the FrameAttribute | LearningFrameAttribute.h | |
TLearningArrayView< 2, const float > GetAttributeData () |
Gets a view of the complete large array of attribute data stored as (ChannelNum, TotalFrameNum) | LearningFrameAttribute.h | |
TLearningArrayView< 2, float > GetAttributeData () |
Gets a view of the complete large array of attribute data stored as (ChannelNum, TotalFrameNum) | LearningFrameAttribute.h | |
TLearningArrayView< 1, const float > GetChannelAttributeData
(
const int32 ChannelIdx |
Gets a view of the complete attribute data for a single channel | LearningFrameAttribute.h | |
TLearningArrayView< 1, float > GetChannelAttributeData
(
const int32 ChannelIdx |
Gets a view of the complete attribute data for a single channel | LearningFrameAttribute.h | |
const float & GetChannelAttributeDataAtFrame
(
const int32 ChannelIdx, |
Gets the attribute value for a given channel and frame index | LearningFrameAttribute.h | |
float & GetChannelAttributeDataAtFrame
(
const int32 ChannelIdx, |
Gets the attribute value for a given channel and frame index | LearningFrameAttribute.h | |
TLearningArrayView< 1, const float > GetChannelEntryRangeAttributeData
(
const int32 ChannelIdx, |
Gets the attribute data associated with a single channel, and range | LearningFrameAttribute.h | |
TLearningArrayView< 1, float > GetChannelEntryRangeAttributeData
(
const int32 ChannelIdx, |
Gets the attribute data associated with a single channel, and range | LearningFrameAttribute.h | |
int32 GetChannelNum() |
Gets the number of channels in this attribute | LearningFrameAttribute.h | |
TLearningArrayView< 1, const float > GetChannelRangeAttributeData
(
const int32 ChannelIdx, |
Gets the attribute data associated with range offset and length | LearningFrameAttribute.h | |
TLearningArrayView< 1, float > GetChannelRangeAttributeData
(
const int32 ChannelIdx, |
Gets the attribute data associated with range offset and length | LearningFrameAttribute.h | |
const FFrameRangeSet & GetFrameRangeSet() |
Gets the internal FrameRangeSet associated to this attribute | LearningFrameAttribute.h | |
int32 GetTotalFrameNum() |
Gets the total number of frames for this attribute | LearningFrameAttribute.h | |
int32 GetTotalRangeNum() |
Gets the total number of ranges for this attribute | LearningFrameAttribute.h | |
bool IsEmpty() |
True if the FrameAttribute is Empty, otherwise false | LearningFrameAttribute.h |