CrystalSpace

Public API Reference

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

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. More...

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

 csTextureWrapper (csTextureWrapper &)
 Copy constructor. More...

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

iImageGetImageFile ()
 Get the iImage. More...

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

iTextureHandleGetTextureHandle ()
 Get the texture handle. More...

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

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

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

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

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

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...


Detailed Description

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

Definition at line 42 of file csengine/texture.h.


Constructor & Destructor Documentation

csTextureWrapper::csTextureWrapper iImage   Image
 

Construct a texture handle given a image file.

csTextureWrapper::csTextureWrapper iTextureHandle   ith
 

Construct a csTextureWrapper from a pre-registered texture.

csTextureWrapper::csTextureWrapper csTextureWrapper &   
 

Copy constructor.


Member Function Documentation

int csTextureWrapper::GetFlags   [inline]
 

Return the flags which are used to register the texture.

Definition at line 125 of file csengine/texture.h.

iImage* csTextureWrapper::GetImageFile   [inline]
 

Get the iImage.

Definition at line 105 of file csengine/texture.h.

void csTextureWrapper::GetKeyColor int &    red,
int &    green,
int &    blue
[inline]
 

Query the transparent color.

Definition at line 119 of file csengine/texture.h.

iTextureHandle* csTextureWrapper::GetTextureHandle   [inline]
 

Get the texture handle.

Definition at line 114 of file csengine/texture.h.

iTextureCallback* csTextureWrapper::GetUseCallback   [inline]
 

Get the use callback.

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

Definition at line 144 of file csengine/texture.h.

void csTextureWrapper::Register iTextureManager   txtmng
 

Register the texture with the texture manager.

void csTextureWrapper::SetFlags int    flags [inline]
 

Set the flags which are used to register the texture.

Definition at line 123 of file csengine/texture.h.

void csTextureWrapper::SetImageFile iImage   Image
 

Change the base iImage.

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

void csTextureWrapper::SetKeyColor int    red,
int    green,
int    blue
 

Set the transparent color.

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 0.

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.

Definition at line 135 of file csengine/texture.h.

References SCF_SET_REF.

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.

Definition at line 154 of file csengine/texture.h.

References iTextureCallback::UseTexture.


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