TEntityRange

Variadic template representing a contiguous range of entities with a specific set of components

Windows
MacOS
Linux

Inheritance Hierarchy

TEntityRangeImpl

TEntityRange

References

Module

MovieScene

Header

/Engine/Source/Runtime/MovieScene/Public/EntitySystem/MovieSceneEntityRange.h

Include

#include "EntitySystem/MovieSceneEntityRange.h"

Syntax

Remarks

Variadic template representing a contiguous range of entities with a specific set of components

The template parameters define each component type by index, whose constness should match the read/write semantics of the accessor. For example, an entity with a float, int and bool component, accessed read-only should be represented by a TEntityRange<const float, const int const bool>. If one wished to write to all the float components, we would require a TEntityRange<float, const int, const bool> etc

Constructors

Name Description

Public function

TEntityRange()

Default constructor - empty range

Public function

TEntityRange

(
    int32 InNum
)

Constructor that initializes the size, but no component ptrs.

Public function

TEntityRange

(
    int32 InNum,
    T*... InComponentArrays
)

Constructor that initializes the size and components for this range

Functions

Name Description

Public function Const

TEntityPtr< ...

 

begin()

Public function Const

TEntityPtr< ...

 

end()

Public function Const

auto

 

GetAll()

Get all the components for the templated index as a TArrayView.

Public function Const

auto &

 

GetComponent

(
    int32 EntityIndex
)

Get the component from the templated component array index, using its index within this range.

Public function

auto *&

 

GetComponentArrayReference()

Return a reference to the component array pointer at the specified index.

Public function Const

auto *

 

GetComponentOptional

(
    int32 EntityIndex
)

Get a pointer to an entity's component from its templated component array index, using the entity's index within this range.

Public function Const

auto *

 

GetRawUnchecked()

Retrieve the raw pointer to the (possibly nullptr) component array at the templated index.

Public function Const

int32

 

Num()

Access the size of this range

Public function Const

void

 

SetComponent

(
    int32 EntityIndex,
    ValueType&& InValue
)

Assign the value of an entity's component from its templated component array index, using the entity's index within this range.

Operators

Name Description

Public function Const

TEntityPtr< ...

 

operator[]

(
    int32 Index
)

Access a specific entity within this range

Typedefs

Name

Description

PtrType

Super

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss