Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csTextureWrapper Class Reference

csTextureWrapper represents a texture and its link to the iTextureHandle as returned by iTextureManager. More...

#include <texture.h>

Inheritance diagram for csTextureWrapper:

csObject iObject iBase List of all members.

Public Methods

 csTextureWrapper (iImage *Image)
 Construct a texture handle given a image file.

 csTextureWrapper (iTextureHandle *ith)
 Construct a csTextureWrapper from a pre-registered texture.

 csTextureWrapper (csTextureWrapper &)
 Copy constructor.

void SetImageFile (iImage *Image)
 Change the base iImage. More...

iImageGetImageFile ()
 Get the iImage.

void SetTextureHandle (iTextureHandle *tex)
 Change the texture handle. More...

iTextureHandleGetTextureHandle ()
 Get the texture handle.

void SetKeyColor (int red, int green, int blue)
 Set the transparent color.

void GetKeyColor (int &red, int &green, int &blue)
 Query the transparent color.

void SetFlags (int flags)
 Set the flags which are used to register the texture.

int GetFlags ()
 Return the flags which are used to register the texture.

void Register (iTextureManager *txtmng)
 Register the texture with the texture manager.

void SetUseCallback (iTextureCallback *callback)
 Set a callback which is called just before the texture is used. More...

iTextureCallbackGetUseCallback ()
 Get the use callback. More...

void Visit ()
 Visit this texture. More...

 SCF_DECLARE_IBASE_EXT (csObject)

Public Attributes

csTextureWrapper::TextureWrapper  scfiTextureWrapper

Friends

class  TextureWrapper

Detailed Description

csTextureWrapper represents a texture and its link to the iTextureHandle as returned by iTextureManager.


Member Function Documentation

iTextureCallback * csTextureWrapper::GetUseCallback ( ) [inline]
 

Get the use callback.

If there are multiple use callbacks you can use this function to chain.

void csTextureWrapper::SetImageFile ( iImage * Image )
 

Change the base iImage.

The changes will not be visible until the texture is registered again.

void csTextureWrapper::SetTextureHandle ( iTextureHandle * tex )
 

Change the texture handle.

The changes will immediatly be visible. This will also change the key color and registration flags to those of the new texture and the iImage to NULL.

void csTextureWrapper::SetUseCallback ( iTextureCallback * callback ) [inline]
 

Set a callback which is called just before the texture is used.

This is mainly useful for procedural textures which can then choose to update their image.

void csTextureWrapper::Visit ( ) [inline]
 

Visit this texture.

This should be called by the engine right before using the texture. It is responsible for calling the use callback if there is one.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000