Workspace 6.21.5
Public Types | Public Member Functions | List of all members
TextureImage Class Reference

Dimension-and-format-dependent texture image, used as a returned type by Texturizer. More...

#include <Rendering/SceneComponents/Models/textureimage.h>

Public Types

enum  Format { RGBA , Grayscale }
 

Public Member Functions

 TextureImage ()
 
template<typename T >
 TextureImage (const T &i)
 
qint64 cacheKey () const
 
unsigned getDimensions () const
 
Format getFormat () const
 
template<typename T >
const T * getImage () const
 
bool isValid () const
 
void setFormat (Format f)
 

Detailed Description

Member Enumeration Documentation

◆ Format

enum Format
Enumerator
RGBA 
Grayscale 

Constructor & Destructor Documentation

◆ TextureImage() [1/2]

TextureImage ( const T &  i)
inline

◆ TextureImage() [2/2]

TextureImage ( )
inline

Member Function Documentation

◆ cacheKey()

qint64 cacheKey ( ) const
inline
Returns
A cache key which is unique for a given image, or zero if the image is not valid.

◆ getDimensions()

unsigned getDimensions ( ) const
inline
Returns
The number of dimensions for the texture image. If this value is zero, the object does not refer to an image that can be used for anything and getImage() will most likely return a null pointer.

◆ getFormat()

Format getFormat ( ) const
inline
Returns
The format that the texture is in.

◆ getImage()

const T * getImage ( ) const
inline

◆ isValid()

bool isValid ( ) const
inline
Returns
True if the object has been set with an image of at least one dimension.

◆ setFormat()

void setFormat ( Format  f)
inline

Specifies the format that the texture is to be accessed with. By default, the format will be RGBA.