Utils for reading pixels from UTextureRenderTarget2D. 更多...
#include <PixelReader.h>
Public 类型 | |
using | Payload = std::function<void(void *, uint32, uint32, uint32)> |
静态 Public 成员函数 | |
static TUniquePtr< TImagePixelData< FColor > > | DumpPixels (UTextureRenderTarget2D &RenderTarget) |
Dump the pixels in RenderTarget. | |
static TFuture< bool > | SavePixelsToDisk (TUniquePtr< TImagePixelData< FColor > > PixelData, const FString &FilePath) |
Asynchronously save the pixels in PixelData to disk. | |
static TFuture< bool > | SavePixelsToDisk (UTextureRenderTarget2D &RenderTarget, const FString &FilePath) |
Asynchronously save the pixels in RenderTarget to disk. | |
template<typename TSensor , typename TPixel > | |
static void | SendPixelsInRenderThread (TSensor &Sensor, bool use16BitFormat=false, std::function< TArray< TPixel >(void *, uint32)> Conversor={}) |
Convenience function to enqueue a render command that sends the pixels down the Sensor's data stream. | |
static bool | WritePixelsToArray (UTextureRenderTarget2D &RenderTarget, TArray< FColor > &BitMap) |
Copy the pixels in RenderTarget into BitMap. | |
static void | WritePixelsToBuffer (const UTextureRenderTarget2D &RenderTarget, uint32 Offset, FRHICommandListImmediate &InRHICmdList, FPixelReader::Payload FuncForSending) |
Copy the pixels in RenderTarget into Buffer. | |
Utils for reading pixels from UTextureRenderTarget2D.
在文件 PixelReader.h 第 34 行定义.
using FPixelReader::Payload = std::function<void(void *, uint32, uint32, uint32)> |
在文件 PixelReader.h 第 38 行定义.
|
static |
Dump the pixels in RenderTarget.
在文件 PixelReader.cpp 第 100 行定义.
引用了 WritePixelsToArray().
被这些函数引用 SavePixelsToDisk().
|
static |
Asynchronously save the pixels in PixelData to disk.
在文件 PixelReader.cpp 第 121 行定义.
|
static |
Asynchronously save the pixels in RenderTarget to disk.
在文件 PixelReader.cpp 第 114 行定义.
引用了 DumpPixels() , 以及 SavePixelsToDisk().
被这些函数引用 URoadMap::SaveAsPNG(), ASceneCaptureSensor::SaveCaptureToDisk() , 以及 SavePixelsToDisk().
|
static |
Convenience function to enqueue a render command that sends the pixels down the Sensor's data stream.
It expects a sensor derived from ASceneCaptureSensor or compatible.
Note that the serializer needs to define a "header_offset" that it's allocated in front of the buffer.
Blocks until the render thread has finished all it's tasks.
在文件 PixelReader.h 第 94 行定义.
引用了 carla::BufferView::CreateFrom(), carla::streaming::detail::token_type::get_stream_id(), FCarlaEngine::GetFrameCounter(), carla::ros2::ROS2::GetInstance(), SendPixelsInRenderThread(), carla::sensor::CompositeSerializer< Items >::Serialize() , 以及 WritePixelsToBuffer().
被这些函数引用 SendPixelsInRenderThread().
|
static |
Copy the pixels in RenderTarget into BitMap.
在文件 PixelReader.cpp 第 83 行定义.
被这些函数引用 DumpPixels() , 以及 ASceneCaptureSensor::ReadPixels().
|
static |
Copy the pixels in RenderTarget into Buffer.
在文件 PixelReader.cpp 第 19 行定义.
被这些函数引用 SendPixelsInRenderThread().