UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::MovieScene::TEntityRange< T > Struct Template Reference

#include <MovieSceneEntityRange.h>

+ Inheritance diagram for UE::MovieScene::TEntityRange< T >:

Public Types

using PtrType = TEntityPtr< T... >
 
using Super = TEntityRangeImpl< TMakeIntegerSequence< int, sizeof...(T)>, T... >
 

Public Member Functions

 TEntityRange ()
 
 TEntityRange (int32 InNum)
 
 TEntityRange (int32 InNum, T *... InComponentArrays)
 
int32 Num () const
 
TEntityPtr< T... > operator[] (int32 Index) const
 
template<int ComponentTypeIndex>
auto *& GetComponentArrayReference ()
 
template<int ComponentTypeIndex>
autoGetRawUnchecked () const
 
template<int32 ComponentTypeIndex>
auto GetAll () const
 
template<int ComponentTypeIndex>
autoGetComponent (int32 EntityIndex) const
 
template<int ComponentTypeIndex>
autoGetComponentOptional (int32 EntityIndex) const
 
template<int ComponentTypeIndex, typename ValueType >
void SetComponent (int32 EntityIndex, ValueType &&InValue) const
 
TEntityPtr< T... > begin () const
 
TEntityPtr< T... > end () const
 

Detailed Description

template<typename... T>
struct UE::MovieScene::TEntityRange< T >

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

Member Typedef Documentation

◆ PtrType

template<typename... T>
using UE::MovieScene::TEntityRange< T >::PtrType = TEntityPtr<T...>

◆ Super

template<typename... T>
using UE::MovieScene::TEntityRange< T >::Super = TEntityRangeImpl<TMakeIntegerSequence<int, sizeof...(T)>, T...>

Constructor & Destructor Documentation

◆ TEntityRange() [1/3]

template<typename... T>
UE::MovieScene::TEntityRange< T >::TEntityRange ( )
inline

Default constructor - empty range

◆ TEntityRange() [2/3]

template<typename... T>
UE::MovieScene::TEntityRange< T >::TEntityRange ( int32  InNum)
inlineexplicit

Constructor that initializes the size, but no component ptrs. Subsequent calls to InitializeComponentArray should be made

◆ TEntityRange() [3/3]

template<typename... T>
UE::MovieScene::TEntityRange< T >::TEntityRange ( int32  InNum,
T *...  InComponentArrays 
)
inlineexplicit

Constructor that initializes the size and components for this range

Member Function Documentation

◆ begin()

template<typename... T>
TEntityPtr< T... > UE::MovieScene::TEntityRange< T >::begin ( ) const
inline

◆ end()

template<typename... T>
TEntityPtr< T... > UE::MovieScene::TEntityRange< T >::end ( ) const
inline

◆ GetAll()

template<typename... T>
template<int32 ComponentTypeIndex>
auto UE::MovieScene::TEntityRange< T >::GetAll ( ) const
inline

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

Returns
A TArrayView<T> for the component array at this index. T will be const for read-only components.

◆ GetComponent()

template<typename... T>
template<int ComponentTypeIndex>
auto & UE::MovieScene::TEntityRange< T >::GetComponent ( int32  EntityIndex) const
inline

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

Note
: will fail an assertion if this entity range does not contain this component type (eg Read/WriteOptional)
Parameters
EntityIndexThe index of the entity within this range
Returns
A reference to the component matching the constness of the access-mode.

◆ GetComponentArrayReference()

template<typename... T>
template<int ComponentTypeIndex>
auto *& UE::MovieScene::TEntityRange< T >::GetComponentArrayReference ( )
inline

Return a reference to the component array pointer at the specified index. Should only be used for initialization

◆ GetComponentOptional()

template<typename... T>
template<int ComponentTypeIndex>
auto * UE::MovieScene::TEntityRange< T >::GetComponentOptional ( int32  EntityIndex) const
inline

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

Parameters
EntityIndexThe index of the entity within this range
Returns
A pointer to the component matching the constness of the access-mode, or nullptr if the component does not exist in this entity range.

◆ GetRawUnchecked()

template<typename... T>
template<int ComponentTypeIndex>
auto * UE::MovieScene::TEntityRange< T >::GetRawUnchecked ( ) const
inline

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

◆ Num()

template<typename... T>
int32 UE::MovieScene::TEntityRange< T >::Num ( ) const
inline

Access the size of this range

Returns
The number of entities in this range

◆ operator[]()

template<typename... T>
TEntityPtr< T... > UE::MovieScene::TEntityRange< T >::operator[] ( int32  Index) const
inline

Access a specific entity within this range

Parameters
IndexThe index of the entity within this range
Returns
The entity with all its components

◆ SetComponent()

template<typename... T>
template<int ComponentTypeIndex, typename ValueType >
void UE::MovieScene::TEntityRange< T >::SetComponent ( int32  EntityIndex,
ValueType &&  InValue 
) const
inline

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

Parameters
EntityIndexThe index of the entity within this range
InValueThe value to assign to the component

The documentation for this struct was generated from the following file: