CARLA
 
载入中...
搜索中...
未找到
DepthCamera.cpp
浏览该文件的文档.
1// Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
2// de Barcelona (UAB).
3//
4// This work is licensed under the terms of the MIT license.
5// For a copy, see <https://opensource.org/licenses/MIT>.
6
7#include "Carla.h"
9
11
13
18
19ADepthCamera::ADepthCamera(const FObjectInitializer &ObjectInitializer)
20 : Super(ObjectInitializer)
21{
23 TEXT("Material'/Carla/PostProcessingMaterials/PhysicLensDistortion.PhysicLensDistortion'"));
25#if PLATFORM_LINUX
26 TEXT("Material'/Carla/PostProcessingMaterials/DepthEffectMaterial_GLSL.DepthEffectMaterial_GLSL'")
27#else
28 TEXT("Material'/Carla/PostProcessingMaterials/DepthEffectMaterial.DepthEffectMaterial'")
29#endif
30 );
31}
32
33void ADepthCamera::PostPhysTick(UWorld *World, ELevelTick TickType, float DeltaSeconds)
34{
35 TRACE_CPUPROFILER_EVENT_SCOPE(ADepthCamera::PostPhysTick);
36 FPixelReader::SendPixelsInRenderThread<ADepthCamera, FColor>(*this);
37}
static FActorDefinition GetSensorDefinition()
void PostPhysTick(UWorld *World, ELevelTick TickType, float DeltaSeconds) override
ADepthCamera(const FObjectInitializer &ObjectInitializer)
bool AddPostProcessingMaterial(const FString &Path)
Load the UMaterialInstanceDynamic at the given Path and append it to the list of shaders with Weight.
static FActorDefinition MakeCameraDefinition(const FString &Id, bool bEnableModifyingPostProcessEffects=false)
A definition of a Carla Actor with all the variation and attributes.