NL3D::CHLSTextureBank::CTextureInstance Class Reference

#include <hls_texture_bank.h>


Public Member Functions

void buildAsKey (const char *ptr)
void buildColorVersion (NLMISC::CBitmap &out)
 Build a colored version of this texture.

const char * getName () const
bool operator< (const CTextureInstance &t) const
bool operator<= (const CTextureInstance &t) const
bool sameName (const char *str)
void serial (NLMISC::IStream &f)

Private Attributes

uint32 _ColorTextureId
CHLSColorTexture_ColorTexturePtr
uint32 _DataIndex
uint8_DataPtr

Friends

class CHLSTextureBank


Member Function Documentation

void NL3D::CHLSTextureBank::CTextureInstance::buildAsKey const char *  ptr  )  [inline]
 

Definition at line 70 of file hls_texture_bank.h.

References _DataPtr, and uint8.

Referenced by NL3D::CHLSTextureManager::findTexture().

00071                 {
00072                         _DataPtr= (uint8*)ptr;
00073                 }

void NL3D::CHLSTextureBank::CTextureInstance::buildColorVersion NLMISC::CBitmap out  ) 
 

Build a colored version of this texture.

Definition at line 185 of file hls_texture_bank.cpp.

References _ColorTexturePtr, _DataPtr, NL3D::CHLSColorTexture::buildColorVersion(), and uint.

Referenced by NL3D::CHLSTextureManager::buildTexture().

00186 {
00187         // get ptr to color deltas.
00188         uint    nameSize= strlen((const char*)_DataPtr)+1;
00189         CHLSColorDelta          *colDeltas= (CHLSColorDelta*)(_DataPtr + nameSize);
00190 
00191         // build the texture.
00192         _ColorTexturePtr->buildColorVersion(colDeltas, out);
00193 }

const char* NL3D::CHLSTextureBank::CTextureInstance::getName  )  const [inline]
 

Definition at line 75 of file hls_texture_bank.h.

References _DataPtr.

00075 {return (const char*)_DataPtr;}

bool NL3D::CHLSTextureBank::CTextureInstance::operator< const CTextureInstance t  )  const
 

Definition at line 164 of file hls_texture_bank.cpp.

References _DataPtr, and t.

00165 {
00166         // compare the 2 strings.
00167         return (strcmp((const char*)_DataPtr, (const char*)t._DataPtr)<0);
00168 }

bool NL3D::CHLSTextureBank::CTextureInstance::operator<= const CTextureInstance t  )  const
 

Definition at line 170 of file hls_texture_bank.cpp.

References _DataPtr, and t.

00171 {
00172         // compare the 2 strings.
00173         return (strcmp((const char*)_DataPtr, (const char*)t._DataPtr)<=0);
00174 }

bool NL3D::CHLSTextureBank::CTextureInstance::sameName const char *  str  ) 
 

Definition at line 178 of file hls_texture_bank.cpp.

References _DataPtr.

Referenced by NL3D::CHLSTextureManager::findTexture().

00179 {
00180         return (strcmp((const char*)_DataPtr, str)==0);
00181 }

void NL3D::CHLSTextureBank::CTextureInstance::serial NLMISC::IStream f  ) 
 

Definition at line 154 of file hls_texture_bank.cpp.

References _ColorTextureId, _DataIndex, NLMISC::IStream::serial(), NLMISC::IStream::serialVersion(), and sint.

00155 {
00156         sint    ver= f.serialVersion(0);
00157 
00158         f.serial(_DataIndex);
00159         f.serial(_ColorTextureId);
00160 }


Friends And Related Function Documentation

friend class CHLSTextureBank [friend]
 

Definition at line 56 of file hls_texture_bank.h.


Field Documentation

uint32 NL3D::CHLSTextureBank::CTextureInstance::_ColorTextureId [private]
 

Definition at line 60 of file hls_texture_bank.h.

Referenced by NL3D::CHLSTextureBank::addTextureInstance(), NL3D::CHLSTextureBank::compilePtrs(), and serial().

CHLSColorTexture* NL3D::CHLSTextureBank::CTextureInstance::_ColorTexturePtr [private]
 

Definition at line 64 of file hls_texture_bank.h.

Referenced by NL3D::CHLSTextureBank::addTextureInstance(), buildColorVersion(), and NL3D::CHLSTextureBank::compilePtrs().

uint32 NL3D::CHLSTextureBank::CTextureInstance::_DataIndex [private]
 

Definition at line 58 of file hls_texture_bank.h.

Referenced by NL3D::CHLSTextureBank::addTextureInstance(), NL3D::CHLSTextureBank::compilePtrs(), and serial().

uint8* NL3D::CHLSTextureBank::CTextureInstance::_DataPtr [private]
 

Definition at line 62 of file hls_texture_bank.h.

Referenced by NL3D::CHLSTextureBank::addTextureInstance(), buildAsKey(), buildColorVersion(), NL3D::CHLSTextureBank::compilePtrs(), getName(), operator<(), operator<=(), and sameName().


The documentation for this class was generated from the following files:
Generated on Tue Mar 16 06:47:09 2004 for NeL by doxygen 1.3.6