User Tools

Site Tools


DzTexture

Base class for sharable objects that store information for a texture (image map).

More...

Inherits :

Inherited By : DzImageTexture and DzLayeredTexture

Enumerations

Methods

Signals

voiddrawnDataChanged ()
voidtempFilenameChanged ( String filename )

Detailed Description

This class is not intended to be constructed directly. Create (or retrieve) an instance from DzImageMgr - this ensures that there is only one instance of a given image in memory at a time, and also ensures that necessary conversions for rendering the image occurs correctly.

Enumerations


: TextureType

TODO: Add description.

  • Standard - TODO: Add description.
  • LatLong - TODO: Add description.
  • LightProbe - TODO: Add description.
  • CustomTexture - TODO: Add description.

Methods


String : getFilename()

Return Value:

  • The source file name for this image.

Number : getGamma()

Return Value:

  • The gamma of the source file for this image.

Attention:

  • This is used for gamma correction; gamma ⇐ 0 - do best guess of the image gamma; gamma == 1 - no gamma correction needed; gamma > 0 != 1 - the image is at the specified gamma.

Size : getGLAlphaTextureSize()

Return Value:

  • The actual size of the OpenGL texture alpha image.

Size : getGLTextureSize()

Return Value:

  • The actual size of the OpenGL texture image.

Size : getOriginalImageSize()

Return Value:

  • The size of the original image that was the source of this texture.

Pixmap : getPreviewPixmap( Size size )

Parameter(s):

  • size - The size for the pixmap.

Return Value:

  • A preview pixmap of this texture with the specified size.

Pixmap : getPreviewPixmap( Number width, Number height )

Parameter(s):

  • width - The width for the pixmap.
  • height - The height for the pixmap.

Return Value:

  • A preview pixmap of this texture with the specified dimensions.

Number : getRevision()

Return Value:

  • The revision of this texture.

Since:

  • 4.12.0.75

String : getTempFilename()

Return Value:

  • The temporary file name for this image.

Number : getTextureType()

Return Value:

  • The texture type of this texture.

void : incrementRevision( Boolean emitDataChanged=true )

Increments the texture to indicated that it's data has changed.

Parameter(s):

Since:

  • 4.12.0.75

Boolean : loadImageData( Image image )

Loads the image data from the specified image into this texture.

Parameter(s):

  • image - The image to load the data from.

Return Value:

  • true if the image data was loaded, false if there was an error or the image could not be loaded.

Since:

  • 4.6.2.23

void : refresh()

Reloads the image if its source file has changed.


void : setGamma( Number gamma )

Parameter(s):

  • gamma - The gamma to set; gamma ⇐ 0 - do best guess of the image gamma; gamma == 1 - no gamma correction needed; gamma > 0 != 1 - the image is at the specified gamma.

void : setTextureType( Number val )

Sets the texture type for this texture.

Parameter(s):

  • val - The texture type to set.

Signals


void : drawnDataChanged()

Signature:“drawnDataChanged()”

Emitted when the data of the texture has changed - e.g. after a call to refresh()


void : tempFilenameChanged( String filename )

Signature:“tempFilenameChanged(const QString&)”

Emitted when the temporary filename for the image has changed.

Parameter(s):

  • filename - The new temporary filename.