Isle
|
[AI] Represents a texture which wraps a LegoImage and provides loading/saving functionality. More...
#include <legotexture.h>
Public Member Functions | |
LegoTexture () | |
[AI] Constructs a LegoTexture object and allocates a new LegoImage. More... | |
~LegoTexture () | |
[AI] Destructor. Frees the owned LegoImage. More... | |
LegoImage * | GetImage () |
[AI] Returns the associated image used by this texture. More... | |
void | SetImage (LegoImage *p_image) |
[AI] Sets the associated image for this texture. More... | |
LegoResult | Read (LegoStorage *p_storage, LegoU32 p_square) |
[AI] Reads texture data from a LegoStorage. More... | |
LegoResult | Write (LegoStorage *p_storage) |
[AI] Writes texture data to a LegoStorage. More... | |
Protected Attributes | |
LegoImage * | m_image |
[AI] Pointer to the image data associated with this texture. Owned by the LegoTexture instance. More... | |
[AI] Represents a texture which wraps a LegoImage and provides loading/saving functionality.
[AI] LegoTexture owns a pointer to a LegoImage and is responsible for managing its lifetime. It provides methods to read texture data from and write it to a LegoStorage (file/memory), delegating the actual I/O work to the underlying LegoImage. Used throughout the LEGO Island engine for texture management. [AI]
Definition at line 15 of file legotexture.h.
LegoTexture::LegoTexture | ( | ) |
[AI] Constructs a LegoTexture object and allocates a new LegoImage.
Definition at line 10 of file legotexture.cpp.
LegoTexture::~LegoTexture | ( | ) |
[AI] Destructor. Frees the owned LegoImage.
Definition at line 16 of file legotexture.cpp.
|
inline |
[AI] Returns the associated image used by this texture.
Definition at line 25 of file legotexture.h.
LegoResult LegoTexture::Read | ( | LegoStorage * | p_storage, |
LegoU32 | p_square | ||
) |
[AI] Reads texture data from a LegoStorage.
p_storage | [AI] Storage object to read from (can be file or memory). |
p_square | [AI] The mipmap or level-of-detail index to read (purpose dependent on image format). |
[AI] Delegates the actual reading process to the internal LegoImage object.
Definition at line 22 of file legotexture.cpp.
|
inline |
[AI] Sets the associated image for this texture.
p_image | [AI] The new LegoImage instance to associate with this texture. Ownership is NOT transferred. The previous image is not deleted. [AI] |
Definition at line 29 of file legotexture.h.
LegoResult LegoTexture::Write | ( | LegoStorage * | p_storage | ) |
[AI] Writes texture data to a LegoStorage.
p_storage | [AI] Storage object to write to (can be file or memory). |
[AI] Delegates the actual writing process to the internal LegoImage object.
Definition at line 28 of file legotexture.cpp.
|
protected |
[AI] Pointer to the image data associated with this texture. Owned by the LegoTexture instance.
Definition at line 45 of file legotexture.h.