|
CARLA
|
#include <ShaderBasedSensor_WideAngleLens.h>
Inheritance diagram for AShaderBasedSensor_WideAngleLens:Public Member Functions | |
| bool | AddPostProcessingMaterial (const FString &Path) |
| void | AddShader (const FSensorShader &Shader) |
| Add a post-processing shader. | |
| AShaderBasedSensor_WideAngleLens (const FObjectInitializer &ObjectInitializer) | |
| void | Set (const FActorDescription &ActorDescription) override |
| void | SetFloatShaderParameter (uint8_t ShaderIndex, const FName &ParameterName, float Value) |
Public Member Functions inherited from ASceneCaptureSensor_WideAngleLens | |
| ASceneCaptureSensor_WideAngleLens (const FObjectInitializer &ObjectInitializer) | |
| void | EnablePostProcessingEffects (bool Enable=true) |
| void | EnqueueRenderSceneImmediate () |
| Immediate enqueues render commands of the scene at the current time. | |
| const TArray< float > & | GetCameraCoefficients () const |
| ECameraModel | GetCameraModel () const |
| TArrayView< USceneCaptureComponent2D_CARLA * > | GetCaptureComponents2D () |
| UTextureRenderTarget2D * | GetCaptureRenderTarget () |
| const FRHISamplerState * | GetCubemapSampler () const |
| int32 | GetFaceSize () const |
| float | GetFocalLength () const |
| float | GetFOVAngle () const |
| float | GetFOVAngleX () const |
| float | GetFOVAngleY () const |
| float | GetFOVFadeSize () const |
| bool | GetFOVMaskEnable () const |
| uint32 | GetImageHeight () const |
| FIntPoint | GetImageSize () const |
| uint32 | GetImageWidth () const |
| const TArray< float > & | GetLensLUT () const |
| float | GetLensThetaMax () const |
| FRHIGPUReadbackPoolPtr | GetReadbackPool () const |
| Recycling pool of GPU readback staging buffers for the projected image (created in BeginPlay, dropped in EndPlay), as ASceneCaptureSensor owns one for the pinhole cameras; without it every frame allocated a fresh staging buffer. | |
| bool | GetRenderEquirectangular () const |
| float | GetRenderEquirectangularLongitudeOffset () const |
| bool | GetRenderPerspective () const |
| const FCarlaShowOnlyFilter & | GetShowOnlyFilter () const |
| float | GetTargetGamma () const |
| bool | GetUseRayTracing () const |
| bool | HasExplicitLensIntrinsics () const |
| bool | IsShowOnlyEnabled () const |
| void | SetCameraCoefficients (const TArray< float > &Coefficients) |
| void | SetCameraCoefficients (TArrayView< const float > Coefficients) |
| void | SetCameraModel (ECameraModel NewCameraModel) |
| void | SetCubemapSampler (FRHISamplerState *NewCubemapSampler) |
| void | SetFaceSize (int32 Side) |
| Side length in pixels of the six cube-face render targets. | |
| void | SetFocalLength (float NewFocalLength) |
| void | SetFOVAngle (float NewFOV) |
| void | SetFOVFadeSize (float NewFOVFadeSize) |
| void | SetFOVMaskEnable (bool bEnable) |
| void | SetImageSize (int32 Width, int32 Height) |
| void | SetImageSize (uint32 Width, uint32 Height) |
| void | SetLensIntrinsics (float Fx, float Fy, float Cx, float Cy) |
| Explicit intrinsics in normalized viewport units, the same convention as sensor.camera.rt_lens: x_px = (Cx + Fx * R * cos(phi)) * Width, y_px = (Cy + Fy * R * sin(phi)) * Height. | |
| void | SetLensLUT (const TArray< float > &Samples, float ThetaMaxRadians) |
| LUT1D camera model: R(Theta) samples, uniformly spaced over [0, ThetaMaxRadians], monotonically non-decreasing, in the normalized units of the lens intrinsics (pixel = c + f * R, see SetLensIntrinsics). | |
| void | SetRenderEquirectangular (bool bEnable) |
| void | SetRenderEquirectangularLongitudeOffset (float Shift) |
| void | SetRenderPerspective (bool bEnable) |
| void | SetShadowCatcherTags (const FString &CommaSeparatedLabels) |
| void | SetShowOnlyActorIds (const FString &CommaSeparatedIds) |
| void | SetShowOnlyTags (const FString &CommaSeparatedLabels) |
| Show-only render mode (see FCarlaShowOnlyFilter); applied to all six face captures. | |
| void | SetTargetGamma (float Gamma) |
| void | SetUseRayTracing (bool Enable) |
| void | WaitForRenderThreadToFinish () |
| Blocks until the render thread has finished all its tasks. | |
Public Member Functions inherited from ASensor | |
| bool | AreClientsListening () |
| ASensor (const FObjectInitializer &ObjectInitializer) | |
| void | ClearReadyToTick () |
| std::optional< FActorAttribute > | GetAttribute (const FString Name) |
| const UCarlaEpisode & | GetEpisode () const |
| virtual void | GetMirrorState (carla::multigpu::SensorState &State) const |
| Multi-GPU: the runtime state this sensor starts its next tick from (noise generator, sweep angle, history). | |
| URandomEngine * | GetRandomEngine () |
| float | GetReadyToTickDeltaSeconds () const |
| int32 | GetSeed () const |
| auto | GetToken () const |
| Return the token that allows subscribing to this sensor's stream. | |
| bool | IsReadyToTick () const |
| bool | IsStreamReady () |
| FDataStream | MoveDataStream () |
| virtual void | OnFirstClientConnected () |
| virtual void | OnLastClientDisconnected () |
| void | PostPhysTickInternal (UWorld *World, ELevelTick TickType, float DeltaSeconds) |
| void | SetDataStream (FDataStream InStream) |
| Replace the FDataStream associated with this sensor. | |
| void | SetEpisode (const UCarlaEpisode &InEpisode) |
| virtual void | SetMirrorState (const carla::multigpu::SensorState &State) |
| void | SetPrimaryTick (float DeltaSeconds) |
| Multi-GPU secondary: tick in this engine frame, with the primary's delta. | |
| void | SetSavingDataToDisk (bool bSavingData) |
| void | SetSeed (int32 InSeed) |
| void | Tick (const float DeltaTime) final |
Protected Member Functions | |
| void | SetUpSceneCaptureComponents (TArrayView< USceneCaptureComponent2D_CARLA * > SceneCaptures) override |
Protected Member Functions inherited from ASceneCaptureSensor_WideAngleLens | |
| virtual void | BeginPlay () override |
| void | CaptureSceneExtended () |
| uint8 | ComputeCubemapRenderMask () const |
| virtual void | EndPlay (const EEndPlayReason::Type EndPlayReason) override |
| uint8 | FindFaceIndex (FVector2D UV) const |
| virtual FLinearColor | GetInvalidPixelColor () const |
| Colour written to pixels the lens maps no ray to (LUT1D beyond its last sample). | |
| virtual void | PostPhysTick (UWorld *World, ELevelTick TickType, float DeltaTime) override |
| virtual void | PrePhysTick (float DeltaSeconds) override |
| float | VerticalToHorizontal (float Value) const |
Protected Member Functions inherited from ASensor | |
| void | EndPlay (EEndPlayReason::Type EndPlayReason) override |
| template<typename SensorType > | |
| FAsyncDataStream | GetDataStream (SensorType &&Self) |
| Return the FDataStream associated with this sensor. | |
| void | PostActorCreated () override |
Private Attributes | |
| TArray< FShaderFloatParameterValue > | FloatShaderParams |
| TArray< TObjectPtr< UMaterial > > | MaterialsFound |
| TArray< FSensorShader > | Shaders |
Additional Inherited Members | |
Static Public Member Functions inherited from ASceneCaptureSensor_WideAngleLens | |
| template<typename TSensor > | |
| static void | CaptureAndSendToClient (TSensor &Sensor) |
| Capture the six faces, project them into the lens, and deliver the image through ImageUtil's per-tick batched readback – the same path as every raster camera (ASceneCaptureCamera::PostPhysTick). | |
Static Public Member Functions inherited from ASensor | |
| static FSensorCaptureContext | MakeCaptureContext (const ASensor &Sensor) |
| Call on the game thread right after CaptureScene(). | |
Static Protected Member Functions inherited from ASensor | |
| template<typename SensorType , typename ElementType > | |
| static void | SendDataToClient (SensorType &&Sensor, TArrayView< ElementType > SensorData, const FSensorCaptureContext &CaptureContext) |
Protected Attributes inherited from ASceneCaptureSensor_WideAngleLens | |
| bool | bEnable16BitFormat: 1 |
| bool | bEnablePostProcessingEffects: 1 |
| bool | bExplicitIntrinsics: 1 |
| bool | bFOVMaskEnable: 1 |
| bool | bRenderEquirectangular: 1 |
| bool | bRenderPerspective: 1 |
| bool | bUseRayTracing: 1 |
| ECameraModel | CameraModel |
| UTextureRenderTarget2D * | CaptureRenderTarget |
| uint8 | CubemapRenderMask |
| FRHISamplerState * | CubemapSampler |
| TArray< USceneCaptureComponent2D_CARLA * > | FaceCaptures |
| TArray< UTextureRenderTarget2D * > | FaceRenderTargets |
| int32 | FaceSize = 0 |
| float | FOVFadeSize |
| uint32 | ImageHeight |
| uint32 | ImageWidth |
| TArray< float > | KannalaBrandtCameraCoefficients |
| FVector4f | LensIntrinsics |
| TArray< float > | LensLUT |
| float | LensThetaMax |
| float | LongitudeOffset |
| int32 | NumCaptures = 0 |
| Captures rendered as camera cuts since BeginPlay (carla.Camera.SpawnCameraCuts). | |
| FRHIGPUReadbackPoolPtr | ReadbackPool |
| FCarlaShowOnlyFilter | ShowOnlyFilter |
| Show-only actor filter, applied to every face capture right before the faces are captured (see FCarlaShowOnlyFilter). | |
| float | TargetGamma |
| float | XFOVAngle |
| float | YFocalLength |
| float | YFOVAngle |
Protected Attributes inherited from ASensor | |
| bool | bIsActive = false |
| bool | bSavingDataToDisk = false |
| URandomEngine * | RandomEngine = nullptr |
| Random Engine used to provide noise for sensor output. | |
| int32 | Seed = 123456789 |
| Seed of the pseudo-random engine. | |
Definition at line 14 of file ShaderBasedSensor_WideAngleLens.h.
| AShaderBasedSensor_WideAngleLens::AShaderBasedSensor_WideAngleLens | ( | const FObjectInitializer & | ObjectInitializer | ) |
Definition at line 16 of file ShaderBasedSensor_WideAngleLens.cpp.
References ASceneCaptureSensor_WideAngleLens::EnablePostProcessingEffects().
| bool AShaderBasedSensor_WideAngleLens::AddPostProcessingMaterial | ( | const FString & | Path | ) |
Definition at line 22 of file ShaderBasedSensor_WideAngleLens.cpp.
References MaterialsFound.
Referenced by ADepthCamera_WideAngleLens::ADepthCamera_WideAngleLens(), AInstanceSegmentationCamera_WideAngleLens::AInstanceSegmentationCamera_WideAngleLens(), and ASemanticSegmentationCamera_WideAngleLens::ASemanticSegmentationCamera_WideAngleLens().
|
inline |
Add a post-processing shader.
Definition at line 30 of file ShaderBasedSensor_WideAngleLens.h.
Referenced by SetUpSceneCaptureComponents().
|
overridevirtual |
Reimplemented from ASceneCaptureSensor_WideAngleLens.
Definition at line 77 of file ShaderBasedSensor_WideAngleLens.cpp.
References UActorBlueprintFunctionLibrary::SetCamera().
| void AShaderBasedSensor_WideAngleLens::SetFloatShaderParameter | ( | uint8_t | ShaderIndex, |
| const FName & | ParameterName, | ||
| float | Value | ||
| ) |
Definition at line 83 of file ShaderBasedSensor_WideAngleLens.cpp.
References FloatShaderParams.
Referenced by UActorBlueprintFunctionLibrary::SetCamera().
|
overrideprotectedvirtual |
Reimplemented from ASceneCaptureSensor_WideAngleLens.
Definition at line 41 of file ShaderBasedSensor_WideAngleLens.cpp.
References AddShader(), FloatShaderParams, MaterialsFound, and Shaders.
|
private |
Definition at line 50 of file ShaderBasedSensor_WideAngleLens.h.
Referenced by SetFloatShaderParameter(), and SetUpSceneCaptureComponents().
|
private |
Definition at line 44 of file ShaderBasedSensor_WideAngleLens.h.
Referenced by AddPostProcessingMaterial(), and SetUpSceneCaptureComponents().
|
private |
Definition at line 47 of file ShaderBasedSensor_WideAngleLens.h.
Referenced by SetUpSceneCaptureComponents().