FManagedArrayCollection

ManagedArrayCollection

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

GeometryCollectionCore

Header

/Engine/Source/Runtime/Experimental/GeometryCollectionCore/Public/GeometryCollection/ManagedArrayCollection.h

Include

#include "GeometryCollection/ManagedArrayCollection.h"

Syntax

class FManagedArrayCollection

Remarks

ManagedArrayCollection

The ManagedArrayCollection is an entity system that implements a homogeneous, dynamically allocated, manager of primitive TArray structures. The collection stores groups of TArray attributes, where each attribute within a group is the same length. The collection will make use of the TManagedArray class, providing limited interaction with the underlying TArray .

For example:

FManagedArrayCollection* Collection(NewObject<FManagedArrayCollection>()); Collection>AddElements(10, "GroupBar"); // Create a group GroupBar and add 10 elements. Collection>AddAttribute<FVector>("AttributeFoo", "GroupBar"); // Add a FVector array named AttributeFoo to GroupBar. TManagedArray<FVector> & Foo = Collection->GetAttribute<FVector>("AttributeFoo", "GroupBar"); // Get AttributeFoo for (int32 i = 0; i < Foo.Num() ; i++) { Foo[i] = FVector(i, i, i) ; // Update AttribureFoo's elements }

Constructors

Destructors

Name Description

Public function Virtual

~FManagedArrayCollection()

Functions

Name Description

Public function

TManagedArra ...

 

AddAttribute

(
    FName Name,
    FName Group,
    FConstructionParameters Parameters
)

Add an attribute of Type(T) to the group

Public function

int32

 

AddElements

(
    int32 NumberElements,
    FName Group
)

Add elements to a group

Public function

void

 

AddExternalAttribute

(
    FName Name,
    FName Group,
    TManagedArray < T >& ValueIn,
    FConstructionParameters Parameters
)

Add an external attribute of Type(T) to the group for size management.

Public function

void

 

AddGroup

(
    FName Group
)

Create a group on the collection. Adding attribute will also create unknown groups.

Public function Const

TArray < FNam ...

 

AttributeNames

(
    FName Group
)

List all the attributes in a group names.

Public function

void

 

CopyAttribute

(
    const FManagedArrayCollection & InC...,
    FName Name,
    FName Group
)

Copy an attribute.

Public function

void

 

CopyMatchingAttributesFrom

(
    const FManagedArrayCollection & InC...,
    const TMap < FName , TSet < FName >>&...
)

Copy attributes that match the input collection. This is a utility to easily sync collections

Public function Const

const TManag ...

 

FindAttribute

(
    FName Name,
    FName Group
)

Public function

TManagedArra ...

 

FindAttribute

(
    FName Name,
    FName Group
)

Returns attribute(Name) of Type(T) from the group

Public function Const

const TManag ...

 

FindAttributeTyped

(
    FName Name,
    FName Group
)

Public function

TManagedArra ...

 

FindAttributeTyped

(
    FName Name,
    FName Group
)

Returns attribute(Name) of Type(T) from the group if and only if the types of T and the array match

Public function Const

const TManag ...

 

GetAttribute

(
    FName Name,
    FName Group
)

Public function

TManagedArra ...

 

GetAttribute

(
    FName Name,
    FName Group
)

Returns attribute access of Type(T) from the group

Public function Const

TArray < FNam ...

 

GroupNames()

List all the group names.

Public function Const

bool

 

HasAttribute

(
    FName Name,
    FName Group
)

Check for the existence of a attribute

Public function Const

bool

 

HasGroup

(
    FName Group
)

Check for the existence of a group

Public function Const

bool

 

IsDirty()

Public function

void

 

MakeClean()

Public function

void

 

MakeDirty()

Updated for Render ( Mark it dirty ) question: is this the right place for this?

Public function Const

int32

 

NumElements

(
    FName Group
)

Number of elements in a group

Public function

void

 

RemoveAttribute

(
    FName Name,
    FName Group
)

Remove the attribute from the collection.

Public function

void

 

RemoveDependencyFor

(
    FName Group
)

Public function Virtual

void

 

RemoveElements

(
    const FName & Group,
    const TArray < int32 >& SortedDelet...,
    FProcessingParameters Params
)

Remove the element at index and reindex the dependent arrays

Public function

void

 

RemoveGroup

(
    FName Group
)

Remove the group from the collection.

Public function Virtual

void

 

ReorderElements

(
    FName Group,
    const TArray < int32 >& NewOrder
)

Reorders elements in a group. NewOrder must be the same length as the group.

Public function

void

 

Reserve

(
    int32 Size,
    FName Group
)

Reserve a group

Public function

void

 

Resize

(
    int32 Size,
    FName Group
)

Resize a group

Public function Virtual

void

 

Serialize

(
    Chaos::FChaosArchive & Ar
)

Serialize

Public function

void

 

SetDependency

(
    FName Name,
    FName Group,
    FName DependencyGroup
)

Protected function

void

 

SyncGroupSizeFrom

(
    const FManagedArrayCollection & InC...,
    FName Group
)

Size and order a group so that it matches the group found in the input collection.

Public function Const

FString

 

ToString()

Dump the contents to a FString

Operators

Name Description

Public function

FManagedArra ...

 

operator=

Public function

FManagedArra ...

 

operator=

(
    const FManagedArrayCollection &
)

Classes

Typedefs

Name

Description

EArrayType

FKeyType

Constants

Name

Description

Invalid

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback