|
CARLA
|
Frame data packet 25: the primary's clocks and episode settings for one frame. More...
#include <frameTime.h>
Public Member Functions | |
| bool | Read (std::istream &in, uint32_t size) |
| Reads a payload of size bytes. | |
| void | Write (std::ostream &out) const |
Public Attributes | |
| float | actor_active_distance = 200000.0f |
| bool | adjust_signs_height_to_ground = false |
| float | delta_seconds = 0.0f |
| The raw DeltaSeconds that UWorld::Tick(N) received, before time dilation and clamping. | |
| bool | deterministic_ragdolls = true |
| double | elapsed_game_time = 0.0 |
| UCarlaEpisode clocks at the end of frame N. | |
| std::optional< double > | fixed_delta_seconds |
| uint64_t | frame = 0u |
| Frame counter of frame N; equal to the frame's FrameCounter packet. | |
| bool | full_resync = false |
| Set on the frame that rebuilds a secondary from scratch (a new or reconnected secondary, or the first frame after a map load). | |
| float | max_culling_distance = 0.0f |
| double | max_substep_delta_time = 0.01 |
| int32_t | max_substeps = 10 |
| bool | no_rendering_mode = false |
| uint8_t | protocol_version = kMultiGpuProtocolVersion |
| bool | spectator_as_ego = true |
| bool | substepping = true |
| bool | synchronous_mode = false |
| The primary's episode settings after frame N (FEpisodeSettings, in UE units). | |
| float | tile_streaming_distance = 300000.0f |
| float | time_dilation = 1.0f |
| AWorldSettings::GetEffectiveTimeDilation() of frame N. | |
| double | visual_game_time = 0.0 |
| double | world_audio_time_seconds = 0.0 |
| double | world_real_time_seconds = 0.0 |
| double | world_time_seconds = 0.0 |
| UWorld clocks at the start of frame N, before UWorld::Tick adds the delta to them. | |
| double | world_unpaused_time_seconds = 0.0 |
Static Public Attributes | |
| static constexpr uint8_t | kPacketId = 25u |
| static constexpr uint32_t | kPayloadSizeV1 = 98u |
| Size of the version 1 payload; later versions only append fields. | |
Private Types | |
| enum | Flag : uint8_t { kSynchronousMode = 1u << 0u , kFixedDelta = 1u << 1u , kSubstepping = 1u << 2u , kDeterministicRagdolls = 1u << 3u , kSpectatorAsEgo = 1u << 4u , kAdjustSignsHeight = 1u << 5u , kNoRenderingMode = 1u << 6u , kFullResync = 1u << 7u } |
Private Member Functions | |
| uint8_t | PackFlags () const |
| void | UnpackFlags (uint8_t flags) |
Frame data packet 25: the primary's clocks and episode settings for one frame.
A secondary plays frame N with exactly this delta and these times, so whatever it computes is stamped and integrated like on the primary.
Definition at line 20 of file frameTime.h.
|
private |
| Enumerator | |
|---|---|
| kSynchronousMode | |
| kFixedDelta | |
| kSubstepping | |
| kDeterministicRagdolls | |
| kSpectatorAsEgo | |
| kAdjustSignsHeight | |
| kNoRenderingMode | |
| kFullResync | |
Definition at line 132 of file frameTime.h.
|
inlineprivate |
Definition at line 143 of file frameTime.h.
References adjust_signs_height_to_ground, deterministic_ragdolls, fixed_delta_seconds, full_resync, kAdjustSignsHeight, kDeterministicRagdolls, kFixedDelta, kFullResync, kNoRenderingMode, kSpectatorAsEgo, kSubstepping, kSynchronousMode, no_rendering_mode, spectator_as_ego, substepping, and synchronous_mode.
Referenced by Write().
|
inline |
Reads a payload of size bytes.
Fails (and fails in) on a payload shorter than version 1; bytes beyond the fields known here are left for the packet loop to skip.
Definition at line 93 of file frameTime.h.
References actor_active_distance, delta_seconds, elapsed_game_time, fixed_delta_seconds, frame, kFixedDelta, kPayloadSizeV1, max_culling_distance, max_substep_delta_time, max_substeps, protocol_version, carla::multigpu::BoundedReader::Read(), tile_streaming_distance, time_dilation, UnpackFlags(), visual_game_time, world_audio_time_seconds, world_real_time_seconds, world_time_seconds, and world_unpaused_time_seconds.
Referenced by FFrameData::Read().
|
inlineprivate |
Definition at line 156 of file frameTime.h.
References adjust_signs_height_to_ground, deterministic_ragdolls, full_resync, kAdjustSignsHeight, kDeterministicRagdolls, kFullResync, kNoRenderingMode, kSpectatorAsEgo, kSubstepping, kSynchronousMode, no_rendering_mode, spectator_as_ego, substepping, and synchronous_mode.
Referenced by Read().
|
inline |
Definition at line 69 of file frameTime.h.
References actor_active_distance, delta_seconds, elapsed_game_time, fixed_delta_seconds, frame, kPacketId, kPayloadSizeV1, max_culling_distance, max_substep_delta_time, max_substeps, PackFlags(), protocol_version, tile_streaming_distance, time_dilation, visual_game_time, world_audio_time_seconds, world_real_time_seconds, world_time_seconds, world_unpaused_time_seconds, carla::multigpu::WriteFrameDataHeader(), and carla::multigpu::detail::WritePod().
| float carla::multigpu::FrameTime::actor_active_distance = 200000.0f |
Definition at line 58 of file frameTime.h.
Referenced by FrameTimeFromSettings(), Read(), SettingsFromFrameTime(), and Write().
| bool carla::multigpu::FrameTime::adjust_signs_height_to_ground = false |
Definition at line 60 of file frameTime.h.
Referenced by FrameTimeFromSettings(), PackFlags(), SettingsFromFrameTime(), and UnpackFlags().
| float carla::multigpu::FrameTime::delta_seconds = 0.0f |
The raw DeltaSeconds that UWorld::Tick(N) received, before time dilation and clamping.
Definition at line 34 of file frameTime.h.
Referenced by FCarlaEngine::OnPostTick(), FCarlaEngine::PlayPrimaryFrame(), Read(), and Write().
| bool carla::multigpu::FrameTime::deterministic_ragdolls = true |
Definition at line 56 of file frameTime.h.
Referenced by FrameTimeFromSettings(), PackFlags(), SettingsFromFrameTime(), and UnpackFlags().
| double carla::multigpu::FrameTime::elapsed_game_time = 0.0 |
UCarlaEpisode clocks at the end of frame N.
Definition at line 37 of file frameTime.h.
Referenced by FCarlaEngine::OnPostTick(), FCarlaEngine::PlayPrimaryFrame(), Read(), and Write().
| std::optional<double> carla::multigpu::FrameTime::fixed_delta_seconds |
Definition at line 51 of file frameTime.h.
Referenced by FrameTimeFromSettings(), PackFlags(), Read(), SettingsFromFrameTime(), and Write().
| uint64_t carla::multigpu::FrameTime::frame = 0u |
Frame counter of frame N; equal to the frame's FrameCounter packet.
Definition at line 30 of file frameTime.h.
Referenced by FCarlaEngine::OnPostTick(), Read(), and Write().
| bool carla::multigpu::FrameTime::full_resync = false |
Set on the frame that rebuilds a secondary from scratch (a new or reconnected secondary, or the first frame after a map load).
Definition at line 67 of file frameTime.h.
Referenced by FCarlaEngine::OnPostTick(), PackFlags(), FCarlaEngine::PlayPrimaryFrame(), and UnpackFlags().
|
staticconstexpr |
Definition at line 22 of file frameTime.h.
Referenced by FFrameData::Read(), and Write().
|
staticconstexpr |
Size of the version 1 payload; later versions only append fields.
Definition at line 25 of file frameTime.h.
| float carla::multigpu::FrameTime::max_culling_distance = 0.0f |
Definition at line 55 of file frameTime.h.
Referenced by FrameTimeFromSettings(), Read(), SettingsFromFrameTime(), and Write().
| double carla::multigpu::FrameTime::max_substep_delta_time = 0.01 |
Definition at line 53 of file frameTime.h.
Referenced by FrameTimeFromSettings(), Read(), SettingsFromFrameTime(), and Write().
| int32_t carla::multigpu::FrameTime::max_substeps = 10 |
Definition at line 54 of file frameTime.h.
Referenced by FrameTimeFromSettings(), Read(), SettingsFromFrameTime(), and Write().
| bool carla::multigpu::FrameTime::no_rendering_mode = false |
Definition at line 50 of file frameTime.h.
Referenced by FrameTimeFromSettings(), PackFlags(), and UnpackFlags().
| uint8_t carla::multigpu::FrameTime::protocol_version = kMultiGpuProtocolVersion |
Definition at line 27 of file frameTime.h.
| bool carla::multigpu::FrameTime::spectator_as_ego = true |
Definition at line 59 of file frameTime.h.
Referenced by FrameTimeFromSettings(), PackFlags(), SettingsFromFrameTime(), and UnpackFlags().
| bool carla::multigpu::FrameTime::substepping = true |
Definition at line 52 of file frameTime.h.
Referenced by FrameTimeFromSettings(), PackFlags(), SettingsFromFrameTime(), and UnpackFlags().
| bool carla::multigpu::FrameTime::synchronous_mode = false |
The primary's episode settings after frame N (FEpisodeSettings, in UE units).
no_rendering_mode is informational: secondaries keep their own.
Definition at line 49 of file frameTime.h.
Referenced by FrameTimeFromSettings(), PackFlags(), SettingsFromFrameTime(), and UnpackFlags().
| float carla::multigpu::FrameTime::tile_streaming_distance = 300000.0f |
Definition at line 57 of file frameTime.h.
Referenced by FrameTimeFromSettings(), Read(), SettingsFromFrameTime(), and Write().
| float carla::multigpu::FrameTime::time_dilation = 1.0f |
AWorldSettings::GetEffectiveTimeDilation() of frame N.
Definition at line 63 of file frameTime.h.
Referenced by FCarlaEngine::OnPostTick(), FCarlaEngine::PlayPrimaryFrame(), Read(), and Write().
| double carla::multigpu::FrameTime::visual_game_time = 0.0 |
Definition at line 38 of file frameTime.h.
Referenced by FCarlaEngine::OnPostTick(), FCarlaEngine::PlayPrimaryFrame(), Read(), and Write().
| double carla::multigpu::FrameTime::world_audio_time_seconds = 0.0 |
Definition at line 45 of file frameTime.h.
Referenced by FCarlaEngine::OnPostTick(), FCarlaEngine::PlayPrimaryFrame(), Read(), and Write().
| double carla::multigpu::FrameTime::world_real_time_seconds = 0.0 |
Definition at line 44 of file frameTime.h.
Referenced by FCarlaEngine::OnPostTick(), FCarlaEngine::PlayPrimaryFrame(), Read(), and Write().
| double carla::multigpu::FrameTime::world_time_seconds = 0.0 |
UWorld clocks at the start of frame N, before UWorld::Tick adds the delta to them.
Definition at line 42 of file frameTime.h.
Referenced by FCarlaEngine::OnPostTick(), FCarlaEngine::PlayPrimaryFrame(), Read(), and Write().
| double carla::multigpu::FrameTime::world_unpaused_time_seconds = 0.0 |
Definition at line 43 of file frameTime.h.
Referenced by FCarlaEngine::OnPostTick(), FCarlaEngine::PlayPrimaryFrame(), Read(), and Write().