CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

iModelDataTexture Struct Reference

This structure contains the information about a texture for an imported model. More...

#include <mdldata.h>

Inheritance diagram for iModelDataTexture:

iBase csModelDataTexture List of all members.

Public Methods

virtual iObjectQueryObject ()=0
 Query the iObject for this texture.

virtual void SetFileName (const char *fn)=0
 Set the file name of the texture.

virtual const char * GetFileName () const=0
 Return the file name of the texture.

virtual void SetImage (iImage *image)=0
 Set the image object.

virtual iImageGetImage () const=0
 Return the image object.

virtual void SetTextureWrapper (iTextureWrapper *th)=0
 Set the texture wrapper.

virtual iTextureWrapperGetTextureWrapper () const=0
 Return the texture wrapper.

virtual void LoadImage (iVFS *VFS, iImageIO *ImageIO, int Format)=0
 Load the image from a file with the current filename (i.e.

virtual void Register (iTextureList *tl)=0
 Create a texture wrapper from the given texture list.

virtual iModelDataTexture * Clone () const=0
 Clone this texture object.


Detailed Description

This structure contains the information about a texture for an imported model.

There are three possible types of representation for a texture: As a file name, as an iImage or as a texture wrapper. The model data structures will not convert between them automatically, but some convenience functions are included to make conversion easier.

As an example, exporting to a model file which does not contain the textures themselves but only their file name will require that the file name is set. Exporting to a model file which contains the textures directly will contain an iImage to work. Exporting to a mesh object will require a texture wrapper.

Definition at line 54 of file mdldata.h.


Member Function Documentation

virtual iModelDataTexture* iModelDataTexture::Clone   [pure virtual]
 

Clone this texture object.

Note: The underlying texture or image will not be cloned!

Implemented in csModelDataTexture.

virtual const char* iModelDataTexture::GetFileName   [pure virtual]
 

Return the file name of the texture.

Implemented in csModelDataTexture.

virtual iImage* iModelDataTexture::GetImage   [pure virtual]
 

Return the image object.

virtual iTextureWrapper* iModelDataTexture::GetTextureWrapper   [pure virtual]
 

Return the texture wrapper.

virtual void iModelDataTexture::LoadImage iVFS   VFS,
iImageIO   ImageIO,
int    Format
[pure virtual]
 

Load the image from a file with the current filename (i.e.

this texture must have a file name) from the CWD of the given file system. Note: This leaves the texture wrapper untouched.

Implemented in csModelDataTexture.

virtual iObject* iModelDataTexture::QueryObject   [pure virtual]
 

Query the iObject for this texture.

virtual void iModelDataTexture::Register iTextureList   tl [pure virtual]
 

Create a texture wrapper from the given texture list.

Requires that an image object exists.

Implemented in csModelDataTexture.

virtual void iModelDataTexture::SetFileName const char *    fn [pure virtual]
 

Set the file name of the texture.

Implemented in csModelDataTexture.

virtual void iModelDataTexture::SetImage iImage   image [pure virtual]
 

Set the image object.

virtual void iModelDataTexture::SetTextureWrapper iTextureWrapper   th [pure virtual]
 

Set the texture wrapper.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.18