![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <ImageBuilder.h>
Public Member Functions | |
| void | SetDimensions (FImageDimensions DimensionsIn) |
| const FImageDimensions & | GetDimensions () const |
| void | Clear (const PixelType &ClearValue) |
| bool | ContainsPixel (int32 X, int32 Y) const |
| bool | ContainsPixel (const FVector2i &ImageCoords) const |
| PixelType & | GetPixel (int32 X, int32 Y) |
| PixelType & | GetPixel (const FVector2i &ImageCoords) |
| PixelType & | GetPixel (int64 LinearIndex) |
| const PixelType & | GetPixel (int32 X, int32 Y) const |
| const PixelType & | GetPixel (const FVector2i &ImageCoords) const |
| const PixelType & | GetPixel (int64 LinearIndex) const |
| TArrayView64< PixelType > | GetImageBuffer () |
| TConstArrayView64< PixelType > | GetImageBuffer () const |
| void | SetPixel (int32 X, int32 Y, const PixelType &NewValue) |
| void | SetPixel (const FVector2i &ImageCoords, const PixelType &NewValue) |
| void | SetPixel (int64 LinearIndex, const PixelType &NewValue) |
| void | CopyPixel (int64 FromLinearIndex, int64 ToLinearIndex) |
| template<typename OtherType > | |
| void | Convert (TFunctionRef< OtherType(const PixelType &)> ConvertFunc, TImageBuilder< OtherType > &ConvertedImageOut) const |
| template<typename ScalarType , EImageTilingMethod TilingMethod = EImageTilingMethod::Clamp> | |
| PixelType | BilinearSample (const FVector2d &PixelCoords, const PixelType &InvalidValue) const |
| template<typename ScalarType , EImageTilingMethod TilingMethod = EImageTilingMethod::Clamp> | |
| PixelType | BilinearSampleUV (const FVector2d &UVCoords, const PixelType &InvalidValue) const |
| template<EImageTilingMethod TilingMethod = EImageTilingMethod::Clamp> | |
| PixelType | NearestSampleUV (const FVector2d &UVCoords) const |
| bool | IsConstantValue () const |
| TImageBuilder< PixelType > | FastDownsample (int32 SubSteps, const PixelType &ZeroValue, TFunctionRef< PixelType(PixelType, int)> AverageFunc) const |
Static Protected Member Functions | |
| template<EImageTilingMethod TilingMethod> | |
| static FVector2d | GetTiledUV (const FVector2d &UVCoords) |
Protected Attributes | |
| FImageDimensions | Dimensions |
| TDenseGrid2< PixelType > | Image |
TImageBuilder is used to create and populate a 2D image with a templated "pixel" type.
|
inline |
Sample the image value at floating-point pixel coords with Bilinear interpolation The pixel coords are expected to be in the [0,Width]x[0,Height] image pixel rectangle.
|
inline |
Sample the image value at floating-point UV coords with Bilinear interpolation.
|
inline |
Clear all Pixels in the current Mip to the clear/default color for the texture build type
|
inline |
|
inline |
|
inline |
Convert to a different data type of same Dimensions using ConvertFunc
|
inline |
Copy Pixel value from one linear index to another
|
inline |
Very basic downsampling technqiue that just averages NxN pixel blocks. Multi-threaded.
| SubSteps | each NxN pixel block of this size is averaged into 1 pixel in the output image |
| Zero | value to use with template PixelType must be provided, pixel values will be added to this value |
| AverageFunc | Called with Sum(Pixels) and PixelCount, return value is used as new pixel value (eg should be average) |
|
inline |
|
inline |
|
inline |
|
inline |
Get the Pixel at the given X/Y coordinates
|
inline |
Get the Pixel at the given X/Y coordinates
|
inline |
Get the Pixel at the given X/Y coordinates
|
inline |
Get the Pixel at the given X/Y coordinates
|
inline |
Get the Pixel at the given linear index
|
inline |
Get the Pixel at the given linear index
|
inlinestaticprotected |
|
inline |
|
inline |
Sample the image value at floating-point UV coords with Nearest sampling.
|
inline |
|
inline |
Set the Pixel at the given X/Y coordinates to the given PixelType
|
inline |
Set the Pixel at the given X/Y coordinates to the given PixelType
|
inline |
Set the Pixel at the given linear index to the given PixelType
|
protected |
|
protected |