Navigation
API > API/Runtime > API/Runtime/Engine
Helper for the creation of state / input data and history with correct derived type
| Name | TNetworkPhysicsDataHelper |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Public/Physics/NetworkPhysicsComponent.h |
| Include Path | #include "Physics/NetworkPhysicsComponent.h" |
Syntax
template<typename DataType, bool bLegacyData>
struct TNetworkPhysicsDataHelper : public FNetworkPhysicsDataHelper
Inheritance Hierarchy
- FNetworkPhysicsDataHelper → TNetworkPhysicsDataHelper
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~TNetworkPhysicsDataHelper() |
Physics/NetworkPhysicsComponent.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| LatestValidatedInput_External | int32 | // Important is not implemented into the new network flow (yet?) void ApplyDataRange(const Chaos::FBaseRewindHistory* History, const int32 FromFrame, const int32 ToFrame, INetworkPhysicsInputState_Internal& Interface) override { const Chaos::TDataRewindHistory |
for (int32 ApplyFrame = FromFrame; ApplyFrame <= ToFrame; ++ApplyFrame) { const int32 ApplyIndex = NetHistory->GetFrameIndex(ApplyFrame); const DataType& Data = HistoryArray[ApplyIndex]; if (ApplyFrame == Data.LocalFrame) { Interface.ApplyInput(Data); } } } | Physics/NetworkPhysicsComponent.h | |
| LatestValidatedInput_Internal | int32 | Physics/NetworkPhysicsComponent.h |
Functions
Public
Overridden from FNetworkPhysicsDataHelper
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TUniquePtr< FNetworkPhysicsDataHelper > Clone() |
Physics/NetworkPhysicsComponent.h | ||
virtual bool CopyAlteredData
(
const Chaos::FBaseRewindHistory* From, |
Copy data from the rewind history to the networked data collection and only copy data that has been altered since it was created (i.e. the client created an input that the server later altered) | Physics/NetworkPhysicsComponent.h | |
virtual void CopyData
(
const FNetworkPhysicsDataCollection& From, |
Copy data from the networked data collection to the rewind history | Physics/NetworkPhysicsComponent.h | |
virtual void CopyData
(
const Chaos::FBaseRewindHistory* From, |
Copy data from the rewind history to the networked data collection | Physics/NetworkPhysicsComponent.h | |
virtual void CopyDataGrowingOrdered
(
const FNetworkPhysicsDataCollection& From, |
Copy data from the networked data collection to the rewind history and store the data ordered instead of circular and grow the history to fit all unique data | Physics/NetworkPhysicsComponent.h | |
virtual void CopyIncrementalData
(
const Chaos::FBaseRewindHistory* From, |
Copy data from the rewind history to the networked data collection and only copy data that is newer than the already existing data in the data collection | Physics/NetworkPhysicsComponent.h | |
virtual TUniquePtr< FNetworkPhysicsPayload > CreateUniqueData() |
Physics/NetworkPhysicsComponent.h | ||
virtual TUniquePtr< Chaos::FBaseRewindHistory > CreateUniqueRewindHistory
(
const int32 Size |
Physics/NetworkPhysicsComponent.h | ||
virtual bool IsUsingLegacyData() |
Physics/NetworkPhysicsComponent.h | ||
virtual void ValidateData
(
Chaos::FBaseRewindHistory* History, |
Call the ValidateData callback on the external implementation interface for data in the provided rewind history | Physics/NetworkPhysicsComponent.h | |
virtual void ValidateData
(
Chaos::FBaseRewindHistory* History, |
Call the ValidateData callback on the internal implementation interface for data in the provided rewind history | Physics/NetworkPhysicsComponent.h |