24template<
typename PixelType>
47 void Clear(
const PixelType& ClearValue)
75 return Image[LinearIndex];
84 return Image[LinearIndex];
92 return Image[LinearIndex];
101 return Image[LinearIndex];
110 return Image[LinearIndex];
118 return Image[LinearIndex];
139 Image[LinearIndex] = NewValue;
148 Image[LinearIndex] = NewValue;
157 Image[LinearIndex] = NewValue;
173 template<
typename OtherType>
190 template<
typename ScalarType, EImageTilingMethod TilingMethod=EImageTilingMethod::Clamp>
221 XY0.X = FMath::Max(0,
XY0.X);
222 XY0.Y = FMath::Max(0,
XY0.Y);
235 V11 *
static_cast<ScalarType
>(
A.X *
A.Y);
242 template<
typename ScalarType, EImageTilingMethod TilingMethod=EImageTilingMethod::Clamp>
257 template<EImageTilingMethod TilingMethod=EImageTilingMethod::Clamp>
275 PixelType InitialValue =
Image[0];
278 if (
Image[k] != InitialValue)
296 const PixelType& ZeroValue,
340 template<EImageTilingMethod TilingMethod>
402 Image3f->SetDimensions(Dimensions);
break;
404 Image4f->SetDimensions(Dimensions);
break;
415 return Image3f->GetDimensions();
417 return Image4f->GetDimensions();
469 return Image4f->GetPixel(LinearIndex);
#define ensure( InExpression)
Definition AssertionMacros.h:464
void ParallelFor(int32 Num, TFunctionRef< void(int32)> Body, bool bForceSingleThread, bool bPumpRenderingThread=false)
Definition ParallelFor.h:481
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE::Math::TVector< float > FVector3f
Definition MathFwd.h:73
UE::Math::TVector2< double > FVector2d
Definition MathFwd.h:61
UE::Math::TVector4< float > FVector4f
Definition MathFwd.h:75
Definition AssetRegistryState.h:50
static RealType Clamp(const RealType Value, const RealType ClampMin, const RealType ClampMax)
Definition MathUtil.h:222
static RealType Floor(const RealType Value)
Definition MathUtil.h:384
Definition ImageBuilder.h:367
TImageBuilder< FVector3f > * Image3f
Definition ImageBuilder.h:499
FVector4f GetPixel(const FVector2i &PixelCoords) const
Definition ImageBuilder.h:474
EImageType
Definition ImageBuilder.h:371
void SetDimensions(FImageDimensions Dimensions)
Definition ImageBuilder.h:395
void SetPixel(const FVector2i &PixelCoords, const FVector4f &FloatPixel)
Definition ImageBuilder.h:422
void SetPixel(const FVector2i &PixelCoords, const FLinearColor &FloatPixel)
Definition ImageBuilder.h:438
FImageDimensions GetDimensions() const
Definition ImageBuilder.h:408
TImageBuilder< float > * Image1f
Definition ImageBuilder.h:498
FImageAdapter(TImageBuilder< float > *Image)
Definition ImageBuilder.h:377
FImageAdapter(TImageBuilder< FVector4f > *Image)
Definition ImageBuilder.h:389
FVector4f GetPixel(int64 LinearIndex) const
Definition ImageBuilder.h:454
EImageType ImageType
Definition ImageBuilder.h:496
TImageBuilder< FVector4f > * Image4f
Definition ImageBuilder.h:500
FImageAdapter(TImageBuilder< FVector3f > *Image)
Definition ImageBuilder.h:383
Definition ImageDimensions.h:18
int32 GetHeight() const
Definition ImageDimensions.h:40
int64 Num() const
Definition ImageDimensions.h:42
int32 GetWidth() const
Definition ImageDimensions.h:38
int64 GetIndex(int32 X, int32 Y) const
Definition ImageDimensions.h:68
Definition DenseGrid2.h:23
void AssignAll(ElemType Value)
Definition DenseGrid2.h:78
TArray64< ElemType > & GridValues()
Definition DenseGrid2.h:138
void Resize(int32 DimX, int32 DimY, EAllowShrinking AllowShrinking=EAllowShrinking::Default)
Definition DenseGrid2.h:66
Definition ImageBuilder.h:26
PixelType BilinearSample(const FVector2d &PixelCoords, const PixelType &InvalidValue) const
Definition ImageBuilder.h:191
void Convert(TFunctionRef< OtherType(const PixelType &)> ConvertFunc, TImageBuilder< OtherType > &ConvertedImageOut) const
Definition ImageBuilder.h:174
PixelType BilinearSampleUV(const FVector2d &UVCoords, const PixelType &InvalidValue) const
Definition ImageBuilder.h:243
bool ContainsPixel(const FVector2i &ImageCoords) const
Definition ImageBuilder.h:63
void SetPixel(int64 LinearIndex, const PixelType &NewValue)
Definition ImageBuilder.h:155
TArrayView64< PixelType > GetImageBuffer()
Definition ImageBuilder.h:121
static FVector2d GetTiledUV(const FVector2d &UVCoords)
Definition ImageBuilder.h:341
void SetPixel(const FVector2i &ImageCoords, const PixelType &NewValue)
Definition ImageBuilder.h:145
void Clear(const PixelType &ClearValue)
Definition ImageBuilder.h:47
const PixelType & GetPixel(const FVector2i &ImageCoords) const
Definition ImageBuilder.h:107
PixelType NearestSampleUV(const FVector2d &UVCoords) const
Definition ImageBuilder.h:258
const FImageDimensions & GetDimensions() const
Definition ImageBuilder.h:39
TConstArrayView64< PixelType > GetImageBuffer() const
Definition ImageBuilder.h:127
const PixelType & GetPixel(int64 LinearIndex) const
Definition ImageBuilder.h:116
PixelType & GetPixel(int32 X, int32 Y)
Definition ImageBuilder.h:72
TImageBuilder< PixelType > FastDownsample(int32 SubSteps, const PixelType &ZeroValue, TFunctionRef< PixelType(PixelType, int)> AverageFunc) const
Definition ImageBuilder.h:294
PixelType & GetPixel(int64 LinearIndex)
Definition ImageBuilder.h:90
TDenseGrid2< PixelType > Image
Definition ImageBuilder.h:29
PixelType & GetPixel(const FVector2i &ImageCoords)
Definition ImageBuilder.h:81
void CopyPixel(int64 FromLinearIndex, int64 ToLinearIndex)
Definition ImageBuilder.h:164
void SetDimensions(FImageDimensions DimensionsIn)
Definition ImageBuilder.h:33
void SetPixel(int32 X, int32 Y, const PixelType &NewValue)
Definition ImageBuilder.h:136
const PixelType & GetPixel(int32 X, int32 Y) const
Definition ImageBuilder.h:98
bool ContainsPixel(int32 X, int32 Y) const
Definition ImageBuilder.h:55
FImageDimensions Dimensions
Definition ImageBuilder.h:28
bool IsConstantValue() const
Definition ImageBuilder.h:270
EImageTilingMethod
Definition ImageBuilder.h:16
Definition AdvancedWidgetsModule.cpp:13
Definition BlockCodingHelpers.cpp:66
Definition IntVectorTypes.h:20
static TVector2< double > One()
Definition Vector2D.h:80
T X
Definition Vector2D.h:49
static TVector4< float > One()
Definition Vector4.h:185