#include <CarlaReplayerHelper.h>
Public Member Functions | |
void | ProcessReplayerAnimVehicle (CarlaRecorderAnimVehicle Vehicle) |
void | ProcessReplayerAnimWalker (CarlaRecorderAnimWalker Walker) |
std::pair< int, uint32_t > | ProcessReplayerEventAdd (FVector Location, FVector Rotation, CarlaRecorderActorDescription Description, uint32_t DesiredId, bool bIgnoreHero, bool ReplaySensors) |
bool | ProcessReplayerEventDel (uint32_t DatabaseId) |
bool | ProcessReplayerEventParent (uint32_t ChildId, uint32_t ParentId) |
bool | ProcessReplayerFinish (bool bApplyAutopilot, bool bIgnoreHero, std::unordered_map< uint32_t, bool > &IsHero) |
void | ProcessReplayerLightScene (CarlaRecorderLightScene LightScene) |
void | ProcessReplayerLightVehicle (CarlaRecorderLightVehicle LightVehicle) |
bool | ProcessReplayerPosition (CarlaRecorderPosition Pos1, CarlaRecorderPosition Pos2, double Per, double DeltaTime) |
bool | ProcessReplayerStateTrafficLight (CarlaRecorderStateTrafficLight State) |
void | RemoveStaticProps () |
void | SetActorVelocity (FCarlaActor *CarlaActor, FVector Velocity) |
bool | SetCameraPosition (uint32_t Id, FVector Offset, FQuat Rotation) |
void | SetEpisode (UCarlaEpisode *ThisEpisode) |
void | SetWalkerSpeed (uint32_t ActorId, float Speed) |
Private Member Functions | |
FCarlaActor * | FindTrafficLightAt (FVector Location) |
bool | SetActorAutopilot (FCarlaActor *CarlaActor, bool bEnabled, bool bKeepState=false) |
bool | SetActorSimulatePhysics (FCarlaActor *CarlaActor, bool bEnabled) |
std::pair< int, FCarlaActor * > | TryToCreateReplayerActor (FVector &Location, FVector &Rotation, FActorDescription &ActorDesc, uint32_t DesiredId, bool SpawnSensors) |
Private Attributes | |
UCarlaEpisode * | Episode {nullptr} |
Definition at line 23 of file CarlaReplayerHelper.h.
|
private |
Definition at line 106 of file CarlaReplayerHelper.cpp.
References FActorRegistry::begin(), FActorRegistry::end(), Episode, FCarlaActor::GetActorGlobalLocation(), UCarlaEpisode::GetActorRegistry(), FCarlaActor::GetActorType(), and FCarlaActor::TrafficLight.
Referenced by TryToCreateReplayerActor().
void CarlaReplayerHelper::ProcessReplayerAnimVehicle | ( | CarlaRecorderAnimVehicle | Vehicle | ) |
Definition at line 360 of file CarlaReplayerHelper.cpp.
References FCarlaActor::ApplyControlToVehicle(), CarlaRecorderAnimVehicle::bHandbrake, FVehicleControl::bHandBrake, FVehicleControl::bManualGearShift, CarlaRecorderAnimVehicle::Brake, FVehicleControl::Brake, FVehicleControl::bReverse, CarlaRecorderAnimVehicle::DatabaseId, Episode, UCarlaEpisode::FindCarlaActor(), CarlaRecorderAnimVehicle::Gear, FVehicleControl::Gear, FVehicleControl::Steer, CarlaRecorderAnimVehicle::Steering, CarlaRecorderAnimVehicle::Throttle, and FVehicleControl::Throttle.
Referenced by CarlaReplayer::ProcessAnimVehicle(), and SetEpisode().
void CarlaReplayerHelper::ProcessReplayerAnimWalker | ( | CarlaRecorderAnimWalker | Walker | ) |
Definition at line 413 of file CarlaReplayerHelper.cpp.
References CarlaRecorderAnimWalker::DatabaseId, SetWalkerSpeed(), and CarlaRecorderAnimWalker::Speed.
Referenced by CarlaReplayer::ProcessAnimWalker(), and SetEpisode().
std::pair< int, uint32_t > CarlaReplayerHelper::ProcessReplayerEventAdd | ( | FVector | Location, |
FVector | Rotation, | ||
CarlaRecorderActorDescription | Description, | ||
uint32_t | DesiredId, | ||
bool | bIgnoreHero, | ||
bool | ReplaySensors | ||
) |
Definition at line 172 of file CarlaReplayerHelper.cpp.
References CarlaRecorderActorDescription::Attributes, Episode, CarlaRecorderActorDescription::Id, FActorDescription::Id, FActorAttribute::Id, SetActorAutopilot(), SetActorSimulatePhysics(), TryToCreateReplayerActor(), FActorAttribute::Type, FActorDescription::UId, CarlaRecorderActorDescription::UId, FActorAttribute::Value, FActorDescription::Variations, and FCarlaActor::Vehicle.
Referenced by CarlaReplayer::ProcessEventsAdd(), and SetEpisode().
bool CarlaReplayerHelper::ProcessReplayerEventDel | ( | uint32_t | DatabaseId | ) |
Definition at line 231 of file CarlaReplayerHelper.cpp.
References UCarlaEpisode::DestroyActor(), Episode, UCarlaEpisode::FindCarlaActor(), and FCarlaActor::GetActorId().
Referenced by CarlaReplayer::ProcessEventsDel(), and SetEpisode().
bool CarlaReplayerHelper::ProcessReplayerEventParent | ( | uint32_t | ChildId, |
uint32_t | ParentId | ||
) |
Definition at line 245 of file CarlaReplayerHelper.cpp.
References FCarlaActor::AddChildren(), UCarlaEpisode::AttachActors(), Episode, UCarlaEpisode::FindCarlaActor(), FCarlaActor::GetActor(), FCarlaActor::GetActorId(), FCarlaActor::IsDormant(), UCarlaEpisode::PutActorToSleep(), carla::rpc::Rigid, FCarlaActor::SetAttachmentType(), and FCarlaActor::SetParent().
Referenced by CarlaReplayer::ProcessEventsParent(), and SetEpisode().
bool CarlaReplayerHelper::ProcessReplayerFinish | ( | bool | bApplyAutopilot, |
bool | bIgnoreHero, | ||
std::unordered_map< uint32_t, bool > & | IsHero | ||
) |
Definition at line 419 of file CarlaReplayerHelper.cpp.
References FCarlaActor::ApplyControlToVehicle(), FVehicleControl::bHandBrake, FVehicleControl::bManualGearShift, FVehicleControl::Brake, FVehicleControl::bReverse, Episode, FVehicleControl::Gear, FCarlaActor::GetActorId(), UCarlaEpisode::GetActorRegistry(), FCarlaActor::GetActorType(), SetActorSimulatePhysics(), SetActorVelocity(), SetWalkerSpeed(), FVehicleControl::Steer, FVehicleControl::Throttle, FCarlaActor::Vehicle, and FCarlaActor::Walker.
Referenced by SetEpisode(), and CarlaReplayer::Stop().
void CarlaReplayerHelper::ProcessReplayerLightScene | ( | CarlaRecorderLightScene | LightScene | ) |
Definition at line 390 of file CarlaReplayerHelper.cpp.
References CarlaRecorderLightScene::bOn, CarlaRecorderLightScene::Color, Episode, UCarlaLightSubsystem::GetLight(), CarlaRecorderLightScene::Intensity, CarlaRecorderLightScene::LightId, and CarlaRecorderLightScene::Type.
Referenced by CarlaReplayer::ProcessLightScene(), and SetEpisode().
void CarlaReplayerHelper::ProcessReplayerLightVehicle | ( | CarlaRecorderLightVehicle | LightVehicle | ) |
Definition at line 379 of file CarlaReplayerHelper.cpp.
References CarlaRecorderLightVehicle::DatabaseId, Episode, UCarlaEpisode::FindCarlaActor(), FCarlaActor::SetVehicleLightState(), and CarlaRecorderLightVehicle::State.
Referenced by CarlaReplayer::ProcessLightVehicle(), and SetEpisode().
bool CarlaReplayerHelper::ProcessReplayerPosition | ( | CarlaRecorderPosition | Pos1, |
CarlaRecorderPosition | Pos2, | ||
double | Per, | ||
double | DeltaTime | ||
) |
Definition at line 281 of file CarlaReplayerHelper.cpp.
References CarlaRecorderPosition::DatabaseId, Episode, UCarlaEpisode::FindCarlaActor(), CarlaRecorderPosition::Location, CarlaRecorderPosition::Rotation, and FCarlaActor::SetActorGlobalTransform().
Referenced by CarlaReplayer::InterpolatePosition(), and SetEpisode().
bool CarlaReplayerHelper::ProcessReplayerStateTrafficLight | ( | CarlaRecorderStateTrafficLight | State | ) |
Definition at line 337 of file CarlaReplayerHelper.cpp.
References CarlaRecorderStateTrafficLight::DatabaseId, CarlaRecorderStateTrafficLight::ElapsedTime, Episode, UCarlaEpisode::FindCarlaActor(), UTrafficLightController::GetGroup(), FCarlaActor::GetTrafficLightController(), CarlaRecorderStateTrafficLight::IsFrozen, UTrafficLightController::SetElapsedTime(), ATrafficLightGroup::SetFrozenGroup(), FCarlaActor::SetTrafficLightState(), and CarlaRecorderStateTrafficLight::State.
Referenced by CarlaReplayer::ProcessStates(), and SetEpisode().
void CarlaReplayerHelper::RemoveStaticProps | ( | ) |
Definition at line 484 of file CarlaReplayerHelper.cpp.
References Episode.
Referenced by CarlaReplayer::CheckPlayAfterMapLoaded(), CarlaReplayer::ReplayFile(), and SetEpisode().
|
private |
Definition at line 156 of file CarlaReplayerHelper.cpp.
References FCarlaActor::SetActorAutopilot(), and Success.
Referenced by ProcessReplayerEventAdd().
|
private |
Definition at line 140 of file CarlaReplayerHelper.cpp.
References FCarlaActor::SetActorSimulatePhysics(), and Success.
Referenced by ProcessReplayerEventAdd(), and ProcessReplayerFinish().
void CarlaReplayerHelper::SetActorVelocity | ( | FCarlaActor * | CarlaActor, |
FVector | Velocity | ||
) |
Definition at line 461 of file CarlaReplayerHelper.cpp.
References FCarlaActor::SetActorTargetVelocity().
Referenced by ProcessReplayerFinish(), and SetEpisode().
bool CarlaReplayerHelper::SetCameraPosition | ( | uint32_t | Id, |
FVector | Offset, | ||
FQuat | Rotation | ||
) |
Definition at line 311 of file CarlaReplayerHelper.cpp.
References Episode, UCarlaEpisode::FindCarlaActor(), FCarlaActor::GetActorGlobalTransform(), UCarlaEpisode::GetSpectatorPawn(), and FCarlaActor::SetActorGlobalTransform().
Referenced by SetEpisode(), and CarlaReplayer::UpdatePositions().
|
inline |
Definition at line 29 of file CarlaReplayerHelper.h.
References Episode, ProcessReplayerAnimVehicle(), ProcessReplayerAnimWalker(), ProcessReplayerEventAdd(), ProcessReplayerEventDel(), ProcessReplayerEventParent(), ProcessReplayerFinish(), ProcessReplayerLightScene(), ProcessReplayerLightVehicle(), ProcessReplayerPosition(), ProcessReplayerStateTrafficLight(), RemoveStaticProps(), SetActorVelocity(), SetCameraPosition(), SetWalkerSpeed(), State, and Vehicle.
Referenced by CarlaReplayer::SetEpisode().
void CarlaReplayerHelper::SetWalkerSpeed | ( | uint32_t | ActorId, |
float | Speed | ||
) |
Definition at line 471 of file CarlaReplayerHelper.cpp.
References FCarlaActor::ApplyControlToWalker(), Episode, UCarlaEpisode::FindCarlaActor(), and FWalkerControl::Speed.
Referenced by ProcessReplayerAnimWalker(), ProcessReplayerFinish(), and SetEpisode().
|
private |
Definition at line 34 of file CarlaReplayerHelper.cpp.
References FActorRegistry::Contains(), Episode, UCarlaEpisode::FindCarlaActor(), FindTrafficLightAt(), UCarlaEpisode::GetActorRegistry(), UCarlaStatics::GetLargeMapManager(), FActorDescription::Id, ALargeMapManager::OnActorSpawned(), and UCarlaEpisode::SpawnActorWithInfo().
Referenced by ProcessReplayerEventAdd().
|
private |
Definition at line 83 of file CarlaReplayerHelper.h.
Referenced by FindTrafficLightAt(), ProcessReplayerAnimVehicle(), ProcessReplayerEventAdd(), ProcessReplayerEventDel(), ProcessReplayerEventParent(), ProcessReplayerFinish(), ProcessReplayerLightScene(), ProcessReplayerLightVehicle(), ProcessReplayerPosition(), ProcessReplayerStateTrafficLight(), RemoveStaticProps(), SetCameraPosition(), SetEpisode(), SetWalkerSpeed(), and TryToCreateReplayerActor().