CrystalSpace

Public API Reference

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

iModelDataTexture Struct Reference

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

#include <imesh/mdldata.h>

Inheritance diagram for iModelDataTexture:

iBase csModelDataTexture List of all members.

Public Member Functions

virtual iModelDataTextureClone () const =0
 Clone this texture object.
virtual const char * GetFileName () const =0
 Return the file name of the texture.
virtual iImageGetImage () const =0
 Return the image object.
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 iObjectQueryObject ()=0
 Query the iObject for this texture.
virtual void Register (iTextureList *tl)=0
 Create a texture wrapper from the given texture list.
virtual void SetFileName (const char *fn)=0
 Set the file name of the texture.
virtual void SetImage (iImage *image)=0
 Set the image object.
virtual void SetTextureWrapper (iTextureWrapper *th)=0
 Set the texture wrapper.

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 55 of file mdldata.h.


Member Function Documentation

virtual iModelDataTexture* iModelDataTexture::Clone  )  const [pure virtual]
 

Clone this texture object.

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

Implemented in csModelDataTexture.

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

Return the file name of the texture.

Implemented in csModelDataTexture.

virtual iImage* iModelDataTexture::GetImage  )  const [pure virtual]
 

Return the image object.

virtual iTextureWrapper* iModelDataTexture::GetTextureWrapper  )  const [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.4.4