Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FObjectThumbnail Class Reference

#include <ObjectThumbnail.h>

+ Collaboration diagram for FObjectThumbnail:

Public Member Functions

 FObjectThumbnail ()
 
int32 GetImageWidth () const
 
int32 GetImageHeight () const
 
int32 GetCompressedDataSize () const
 
void SetImageSize (int32 InWidth, int32 InHeight)
 
bool IsLoadedFromDisk (void) const
 
bool IsCreatedAfterCustomThumbsEnabled (void) const
 
void SetCreatedAfterCustomThumbsEnabled (void)
 
bool IsDirty () const
 
void MarkAsDirty ()
 
TArray< uint8 > & AccessImageData ()
 
const TArray< uint8 > & AccessImageData () const
 
TArray< uint8 > & AccessCompressedImageData ()
 
bool IsEmpty () const
 
FThumbnailCompressionInterfaceGetCompressor () const
 
FThumbnailCompressionInterfaceChooseNewCompressor () const
 
const TArray< uint8 > & GetUncompressedImageData () const
 
void Serialize (FArchive &Ar)
 
void Serialize (FStructuredArchive::FSlot Slot)
 
void CompressImageData ()
 
void DecompressImageData ()
 
void CountBytes (FArchive &Ar) const
 
void CountImageBytes_Compressed (FArchive &Ar) const
 
void CountImageBytes_Uncompressed (FArchive &Ar) const
 
bool operator== (const FObjectThumbnail &Other) const
 
bool operator!= (const FObjectThumbnail &Other) const
 

Static Public Member Functions

static void SetThumbnailCompressors (FThumbnailCompressionInterface *InPNGThumbnailCompressor, FThumbnailCompressionInterface *InJPEGThumbnailCompressor)
 

Private Attributes

int32 ImageWidth
 
int32 ImageHeight
 
TArray< uint8CompressedImageData
 
TArray< uint8ImageData
 
bool bIsDirty
 
bool bLoadedFromDisk
 
bool bIsJPEG
 
bool bCreatedAfterCustomThumbForSharedTypesEnabled
 

Static Private Attributes

static FThumbnailCompressionInterfacePNGThumbnailCompressor
 
static FThumbnailCompressionInterfaceJPEGThumbnailCompressor
 

Friends

FArchiveoperator<< (FArchive &Ar, FObjectThumbnail &Thumb)
 
FArchiveoperator<< (FArchive &Ar, const FObjectThumbnail &Thumb)
 

Detailed Description

Thumbnail image data for an object.

Definition at line 59 of file ObjectThumbnail.h.

Constructor & Destructor Documentation

◆ FObjectThumbnail()

FObjectThumbnail::FObjectThumbnail ( )

Default constructor.

Member Function Documentation

◆ AccessCompressedImageData()

TArray< uint8 > & FObjectThumbnail::AccessCompressedImageData ( )
inline

Access the compressed image data.

Definition at line 146 of file ObjectThumbnail.h.

◆ AccessImageData() [1/2]

TArray< uint8 > & FObjectThumbnail::AccessImageData ( )
inline

Access the image data in place (does not decompress).

Definition at line 134 of file ObjectThumbnail.h.

◆ AccessImageData() [2/2]

const TArray< uint8 > & FObjectThumbnail::AccessImageData ( ) const
inline

Access the image data in place (does not decompress) const version.

Definition at line 140 of file ObjectThumbnail.h.

◆ ChooseNewCompressor()

FThumbnailCompressionInterface * FObjectThumbnail::ChooseNewCompressor ( ) const

Returns thumbnail compressor that would be used on current uncompressed image data.

◆ CompressImageData()

void FObjectThumbnail::CompressImageData ( )

Compress image data.

◆ CountBytes()

void FObjectThumbnail::CountBytes ( FArchive & Ar) const

Calculates the memory usage of this FObjectThumbnail.

Parameters
Arthe FArchiveCountMem (or similar) archive that will store the results of the memory usage calculation.

◆ CountImageBytes_Compressed()

void FObjectThumbnail::CountImageBytes_Compressed ( FArchive & Ar) const

Calculates the amount of memory used by the compressed bytes array.

Parameters
Arthe FArchiveCountMem (or similar) archive that will store the results of the memory usage calculation.

◆ CountImageBytes_Uncompressed()

void FObjectThumbnail::CountImageBytes_Uncompressed ( FArchive & Ar) const

Calculates the amount of memory used by the uncompressed bytes array.

Parameters
Arthe FArchiveCountMem (or similar) archive that will store the results of the memory usage calculation.

◆ DecompressImageData()

void FObjectThumbnail::DecompressImageData ( )

Decompress image data.

◆ GetCompressedDataSize()

int32 FObjectThumbnail::GetCompressedDataSize ( ) const
inline
Returns
the number of bytes in this thumbnail's compressed image data.

Definition at line 100 of file ObjectThumbnail.h.

◆ GetCompressor()

FThumbnailCompressionInterface * FObjectThumbnail::GetCompressor ( ) const

Returns thumbnail compressor used on current compressed image data.

◆ GetImageHeight()

int32 FObjectThumbnail::GetImageHeight ( ) const
inline

Returns the height of the thumbnail.

Definition at line 94 of file ObjectThumbnail.h.

◆ GetImageWidth()

int32 FObjectThumbnail::GetImageWidth ( ) const
inline

Returns the width of the thumbnail.

Definition at line 88 of file ObjectThumbnail.h.

◆ GetUncompressedImageData()

const TArray< uint8 > & FObjectThumbnail::GetUncompressedImageData ( ) const

Returns uncompressed image data, decompressing it on demand if needed.

◆ IsCreatedAfterCustomThumbsEnabled()

bool FObjectThumbnail::IsCreatedAfterCustomThumbsEnabled ( void ) const
inline

Returns true if the thumbnail was saved AFTER custom-thumbnails for shared thumbnail asset types was supported.

Definition at line 116 of file ObjectThumbnail.h.

◆ IsDirty()

bool FObjectThumbnail::IsDirty ( ) const
inline

Returns true if the thumbnail is dirty and needs to be regenerated at some point.

Definition at line 122 of file ObjectThumbnail.h.

◆ IsEmpty()

bool FObjectThumbnail::IsEmpty ( ) const
inline

Returns true if this is an empty thumbnail.

Definition at line 152 of file ObjectThumbnail.h.

◆ IsLoadedFromDisk()

bool FObjectThumbnail::IsLoadedFromDisk ( void ) const
inline

Returns true if the thumbnail was loaded from disk and not dynamically generated.

Definition at line 113 of file ObjectThumbnail.h.

◆ MarkAsDirty()

void FObjectThumbnail::MarkAsDirty ( )
inline

Marks the thumbnail as dirty.

Definition at line 128 of file ObjectThumbnail.h.

◆ operator!=()

bool FObjectThumbnail::operator!= ( const FObjectThumbnail & Other) const
inline

Definition at line 226 of file ObjectThumbnail.h.

◆ operator==()

bool FObjectThumbnail::operator== ( const FObjectThumbnail & Other) const
inline

Comparison operator

Definition at line 218 of file ObjectThumbnail.h.

◆ Serialize() [1/2]

void FObjectThumbnail::Serialize ( FArchive & Ar)

Serializers

◆ Serialize() [2/2]

void FObjectThumbnail::Serialize ( FStructuredArchive::FSlot Slot)

◆ SetCreatedAfterCustomThumbsEnabled()

void FObjectThumbnail::SetCreatedAfterCustomThumbsEnabled ( void )
inline

For newly generated custom thumbnails, mark it as valid in the future.

Definition at line 119 of file ObjectThumbnail.h.

◆ SetImageSize()

void FObjectThumbnail::SetImageSize ( int32 InWidth,
int32 InHeight )
inline

Sets the image dimensions.

Definition at line 106 of file ObjectThumbnail.h.

◆ SetThumbnailCompressors()

static void FObjectThumbnail::SetThumbnailCompressors ( FThumbnailCompressionInterface * InPNGThumbnailCompressor,
FThumbnailCompressionInterface * InJPEGThumbnailCompressor )
inlinestatic

Static: Sets the thumbnail compressor to use when loading/saving packages. The caller is responsible for the object's lifespan.

Parameters
InThumbnailCompressorA class derived from FThumbnailCompressionInterface.

Definition at line 69 of file ObjectThumbnail.h.

Friends And Related Symbol Documentation

◆ operator<< [1/2]

FArchive & operator<< ( FArchive & Ar,
const FObjectThumbnail & Thumb )
friend

Definition at line 211 of file ObjectThumbnail.h.

◆ operator<< [2/2]

FArchive & operator<< ( FArchive & Ar,
FObjectThumbnail & Thumb )
friend

I/O operator

Definition at line 198 of file ObjectThumbnail.h.

Member Data Documentation

◆ bCreatedAfterCustomThumbForSharedTypesEnabled

bool FObjectThumbnail::bCreatedAfterCustomThumbForSharedTypesEnabled
private

Whether this was saved AFTER custom-thumbnails for shared thumbnail asset types was supported

Definition at line 258 of file ObjectThumbnail.h.

◆ bIsDirty

bool FObjectThumbnail::bIsDirty
private

True if the thumbnail is dirty and should be regenerated at some point

Definition at line 249 of file ObjectThumbnail.h.

◆ bIsJPEG

bool FObjectThumbnail::bIsJPEG
private

Whether compressed data is JPEG (else PNG)

Definition at line 255 of file ObjectThumbnail.h.

◆ bLoadedFromDisk

bool FObjectThumbnail::bLoadedFromDisk
private

Whether the thumbnail has a backup on disk

Definition at line 252 of file ObjectThumbnail.h.

◆ CompressedImageData

TArray< uint8 > FObjectThumbnail::CompressedImageData
private

Compressed image data (serialized)

Definition at line 243 of file ObjectThumbnail.h.

◆ ImageData

TArray< uint8 > FObjectThumbnail::ImageData
private

Image data bytes

Definition at line 246 of file ObjectThumbnail.h.

◆ ImageHeight

int32 FObjectThumbnail::ImageHeight
private

Thumbnail height (serialized)

Definition at line 240 of file ObjectThumbnail.h.

◆ ImageWidth

int32 FObjectThumbnail::ImageWidth
private

Thumbnail width (serialized)

Definition at line 237 of file ObjectThumbnail.h.

◆ JPEGThumbnailCompressor

FThumbnailCompressionInterface* FObjectThumbnail::JPEGThumbnailCompressor
staticprivate

Definition at line 80 of file ObjectThumbnail.h.

◆ PNGThumbnailCompressor

FThumbnailCompressionInterface* FObjectThumbnail::PNGThumbnailCompressor
staticprivate

Static: Thumbnail compressor.

Definition at line 79 of file ObjectThumbnail.h.


The documentation for this class was generated from the following file: