Navigation
API > API/Runtime > API/Runtime/StateStream
TStateStream is a generic implementation of IStateStream that contains all the boiler plate code related to ticks, interpolation, etc. Should be the default goto implementation. Inherit this class for each type of state stream Provide a subclass of TStateStreamSettings as template parameter
| Name | TStateStream |
| Type | class |
| Header File | /Engine/Source/Runtime/StateStream/Public/GenericStateStream.h |
| Include Path | #include "GenericStateStream.h" |
Syntax
template<typename Settings>
class TStateStream :
public IStateStream ,
public Settings::InterfaceType,
public IStateStreamHandleOwner
Inheritance Hierarchy
- Settings::InterfaceType → TStateStream
Implements Interfaces
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TStateStream () |
GenericStateStream.h | ||
TStateStream
(
const TStateStream& |
GenericStateStream.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~TStateStream() |
GenericStateStream.h |
Structs
Enums
Public
| Name | Remarks |
|---|---|
| TStateStream |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FDynamicState | typename InterfaceType::DynamicState | GenericStateStream.h | |
| FHandle | typename InterfaceType::Handle | GenericStateStream.h | |
| FInstanceUserDataType | typename Settings::InstanceUserDataType | GenericStateStream.h | |
| FLaneUserDataType | typename Settings::LaneUserDataType | GenericStateStream.h | |
| FStaticState | typename InterfaceType::StaticState | GenericStateStream.h | |
| InterfaceType | typename Settings::InterfaceType | GenericStateStream.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
uint32 GetUsedDynamicStatesCount() |
Get the used dynamic states within the streams. | GenericStateStream.h | |
uint32 GetUsedInstancesCount() |
Get the used instance counts within the streams. | GenericStateStream.h | |
const FDynamicState & Render_GetDynamicState
(
const FHandle& Handle |
Get the instance interpolated dynamic state on the render side. | GenericStateStream.h | |
FInstanceUserDataType *& Render_GetUserData
(
const FHandle& Handle |
Get the instance user data on the render side. | GenericStateStream.h | |
void Render_OnCreateInline
(
const FStaticState& Ss, |
... or use template specialization to avoid virtual calls | GenericStateStream.h | |
void Render_OnDestroyInline
(
const FStaticState& Ss, |
GenericStateStream.h | ||
void Render_OnUpdateInline
(
const FStaticState& Ss, |
GenericStateStream.h |
Public Virtual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FHandle Game_CreateInstance
(
const FStaticState& Ss, |
GenericStateStream.h | ||
virtual void Render_OnCreate
(
const FStaticState& Ss, |
Specialize to do custom things when state has been created / updated or destroyed. | GenericStateStream.h | |
virtual void Render_OnDestroy
(
const FStaticState& Ss, |
GenericStateStream.h | ||
virtual void Render_OnUpdate
(
const FStaticState& Ss, |
GenericStateStream.h |
Overridden from IStateStream
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Game_BeginTick
(
uint32 LaneId |
Create current tick data that will be update later on. | GenericStateStream.h | |
virtual void Game_CreateLane() |
GenericStateStream.h | ||
virtual void Game_DebugRender
(
IStateStreamDebugRenderer& Renderer |
Debug render streams data on GT. | GenericStateStream.h | |
virtual void Game_DestroyLane
(
uint32 LaneId |
GenericStateStream.h | ||
virtual void Game_EndTick
(
StateStreamTime AbsoluteTime, |
Make the current tick available to the renderer (update oldest/newest ticks) and then reset it. | GenericStateStream.h | |
virtual void Game_Exit() |
Release all the instance/ticks/dynamic states stored within that stream. | GenericStateStream.h | |
virtual void * Game_GetVoidPointer() |
Get the state stream interface pointer. | GenericStateStream.h | |
virtual void Game_SetDefaultLane
(
uint32 LaneId |
Set the lane that will be used if provided lane is DefaultLaneId. | GenericStateStream.h | |
virtual void Game_SetLaneUserData
(
uint32 LaneId, |
GenericStateStream.h | ||
virtual const TCHAR * GetDebugName() |
Get the state stream debug name. | GenericStateStream.h | |
virtual uint32 GetId() |
Get the state stream id. | GenericStateStream.h | |
virtual void Render_Enable
(
bool Enable |
Enable the state stream render interpolation. | GenericStateStream.h | |
virtual void Render_Exit() |
Last update of the render dynamic state. | GenericStateStream.h | |
virtual void Render_GarbageCollect() |
Release all the ticks/data stored before the updated render tick. | GenericStateStream.h | |
virtual void Render_PostUpdate() |
Destroy the updated render state. | GenericStateStream.h | |
virtual void Render_Update
(
StateStreamTime AbsoluteTime |
Interpolate the instance render dynamic state from the available ticks [oldest-newest] given a time. | GenericStateStream.h |
Overridden from IStateStreamHandleOwner
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Game_AddRef
(
uint32 HandleId |
GenericStateStream.h | ||
virtual void * Game_Edit
(
uint32 HandleId, |
GenericStateStream.h | ||
virtual void Game_Release
(
uint32 HandleId |
GenericStateStream.h | ||
virtual void Game_Update
(
uint32 HandleId, |
GenericStateStream.h | ||
virtual void * Render_GetUserData
(
uint32 HandleId |
GenericStateStream.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Interpolate and set the render dynamic states + call create / update / destroy callbacks. Called from the Render_Update. | GenericStateStream.h | ||
FDynamicState & Edit
(
uint32 HandleId, |
Get the dynamic state to be edited on GT in between begin/end tick. | GenericStateStream.h | |
void MakeInternal
(
T& State |
Make the state internal in case it has been released by its owner. | GenericStateStream.h | |
void Update
(
uint32 HandleId, |
Update the editable dynamic state. | GenericStateStream.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TStateStream & operator=
(
const TStateStream& |
GenericStateStream.h |