Keos::CTexture Class Reference

Wrapper class for the ITextureBase. More...

#include <KeosTexture.h>

List of all members.

Public Member Functions

void Create (const TVector2I &Size, TPixelFormat Format, ulong nFlags=0, const String &strName="")
 Create an empty texture.
void CreateFromFile (const String &strFilename, TPixelFormat Format, ulong nFlags=0)
 Create texture from a file.
void CreateFromImage (const CImage &Image, TPixelFormat Format, ulong nFlags=0, const String &strName="")
 Create texture from an image.
void SaveToFile (const String &strFilename) const
 Save the texture in a file.
void Update (const CRectangle &Rect=CRectangle(-1,-1,-1,-1))
 Update the pixels of the texture.
CImageGetPixels ()
 Return an image with the pixels of the texture.
const TVector2IGetSize () const
 Return the dimensions of the texture.
TPixelFormat GetFormat () const
 Return the format of the texture.
const StringGetName () const
 Return the name associated to the texture.
const ITextureBaseGetTextureBase () const
 Return a pointer on the intern texture.
bool operator== (const CTexture &Texture) const
 == operator.
bool operator!= (const CTexture &Texture) const
 != operator.


Detailed Description

Wrapper class for the ITextureBase.

Definition at line 34 of file KeosTexture.h.


Member Function Documentation

void Keos::CTexture::Create ( const TVector2I Size,
TPixelFormat  Format,
ulong  nFlags = 0,
const String strName = "" 
)

Create an empty texture.

Parameters:
Size Dimensions.
Format Pixel format.
nFlags Load options (default 0).
strName Name associated to the texture (default "").

Definition at line 38 of file KeosTexture.cpp.

References CreateFromImage().

void Keos::CTexture::CreateFromFile ( const String strFilename,
TPixelFormat  Format,
ulong  nFlags = 0 
)

Create texture from a file.

Parameters:
strFilename Path of the file.
Format Pixel format.
nFlags Load options (default 0).

Definition at line 45 of file KeosTexture.cpp.

References Keos::CSingleton< T >::Instance().

Referenced by Keos::CMaterial::CreateTexture().

void Keos::CTexture::CreateFromImage ( const CImage Image,
TPixelFormat  Format,
ulong  nFlags = 0,
const String strName = "" 
)

Create texture from an image.

Parameters:
Image Image to be loaded.
Format Pixel format.
nFlags Load options (default 0).
strName Name associated to the texture (default "").

Definition at line 61 of file KeosTexture.cpp.

References Keos::CSingleton< T >::Instance().

Referenced by Create(), and Keos::CMaterial::CreateTexture().

void Keos::CTexture::SaveToFile ( const String strFilename  )  const

Save the texture in a file.

Parameters:
strFilename Path of the target file.

Definition at line 121 of file KeosTexture.cpp.

References Keos::CSingleton< T >::Instance().

void Keos::CTexture::Update ( const CRectangle Rect = CRectangle(-1,-1,-1,-1)  ) 

Update the pixels of the texture.

Parameters:
Rect Rectangle to update in the texture (default (-1,-1,-1,-1)).

Definition at line 127 of file KeosTexture.cpp.

References GetSize(), and Keos::CRectangle::Width().

CImage & Keos::CTexture::GetPixels (  ) 

Return an image with the pixels of the texture.

Definition at line 136 of file KeosTexture.cpp.

const TVector2I & Keos::CTexture::GetSize (  )  const

Return the dimensions of the texture.

Definition at line 142 of file KeosTexture.cpp.

Referenced by Update().

TPixelFormat Keos::CTexture::GetFormat (  )  const

Return the format of the texture.

Definition at line 148 of file KeosTexture.cpp.

const String & Keos::CTexture::GetName (  )  const

Return the name associated to the texture.

Definition at line 154 of file KeosTexture.cpp.

const ITextureBase * Keos::CTexture::GetTextureBase (  )  const

Return a pointer on the intern texture.

Definition at line 160 of file KeosTexture.cpp.

bool Keos::CTexture::operator== ( const CTexture Texture  )  const

== operator.

Definition at line 166 of file KeosTexture.cpp.

References m_Texture.

bool Keos::CTexture::operator!= ( const CTexture Texture  )  const

!= operator.

Definition at line 172 of file KeosTexture.cpp.


The documentation for this class was generated from the following files:
Generated on Fri Mar 9 14:29:29 2007 for Keos by  doxygen 1.5.1-p1