NL3D::CHLSColorTexture Class Reference

A colorisable texture. More...

#include <hls_color_texture.h>

List of all members.

Classes

struct  CMask
struct  CVectorInt

Public Member Functions

 CHLSColorTexture ()
void reset ()
 reset the build
void setBitmap (const NLMISC::CBitmap &bmp)
 setup the un-colored bitmap for the texture.
void addMask (const NLMISC::CBitmap &bmp, uint threshold=15)
 add a mask to the texture.
uint getNumMasks () const
 get num of masks
void buildColorVersion (const CHLSColorDelta *colDeltaList, NLMISC::CBitmap &out)
 build a texture with a HLS Color Delta
void serial (NLMISC::IStream &f)

Static Public Member Functions

static void compressBlockRGB (CRGBA *srcRGBA, uint8 *dstDXTC)
 compress DXTC5 RGB only block, from a RGBA raw array. dstDXTC Alpha part is not modified. srcRGBA->A are setup to 0!!

Static Private Member Functions

static void uncompressBlockRGB (const uint8 *srcDXTC, CRGBA *dstRGBA)
 uncompress DXTC5 RGB only block, into a RGBA raw array. Alpha is setup with undefined values
static void computeMinMax (sint *diffBlock, CVectorInt &v, sint mean[3], sint rgb0[3], sint rgb1[3])
 used by compressBlockRGB()
static void colorizeDXTCBlockRGB (const uint8 *srcPtr, uint8 *dstPtr, uint8 dHue, uint dLum, uint dSat)
 apply colDelta to the block. Alpha part is not modified. MMX with no EMMS called here !!!

Private Attributes

uint32 _Width
uint32 _Height
uint32 _NumMipMap
uint32 _BlockToCompressIndex
std::vector< uint8_Texture
std::vector< CMask_Masks

Detailed Description

A colorisable texture.

Author:
Lionel Berenguier
Nevrax France
Date:
2002

Definition at line 68 of file hls_color_texture.h.


Constructor & Destructor Documentation

NL3D::CHLSColorTexture::CHLSColorTexture (  ) 

Definition at line 74 of file hls_color_texture.cpp.

References reset().


Member Function Documentation

void NL3D::CHLSColorTexture::addMask ( const NLMISC::CBitmap bmp,
uint  threshold = 15 
)
void NL3D::CHLSColorTexture::buildColorVersion ( const CHLSColorDelta colDeltaList,
NLMISC::CBitmap out 
)
void NL3D::CHLSColorTexture::colorizeDXTCBlockRGB ( const uint8 srcPtr,
uint8 dstPtr,
uint8  dHue,
uint  dLum,
uint  dSat 
) [static, private]

apply colDelta to the block. Alpha part is not modified. MMX with no EMMS called here !!!

Definition at line 543 of file hls_color_texture.cpp.

References NL3D::CFastHLSModifier::applyHLSMod(), and NL3D::CFastHLSModifier::getInstance().

Referenced by buildColorVersion().

void NL3D::CHLSColorTexture::compressBlockRGB ( CRGBA srcRGBA,
uint8 dstDXTC 
) [static]
void NL3D::CHLSColorTexture::computeMinMax ( sint diffBlock,
CVectorInt v,
sint  mean[3],
sint  rgb0[3],
sint  rgb1[3] 
) [static, private]
uint NL3D::CHLSColorTexture::getNumMasks (  )  const [inline]

get num of masks

Definition at line 88 of file hls_color_texture.h.

References _Masks.

void NL3D::CHLSColorTexture::reset (  ) 

reset the build

Definition at line 80 of file hls_color_texture.cpp.

References _Height, _Masks, _NumMipMap, _Texture, _Width, and NLMISC::contReset().

Referenced by CHLSColorTexture(), and setBitmap().

void NL3D::CHLSColorTexture::serial ( NLMISC::IStream f  ) 
void NL3D::CHLSColorTexture::setBitmap ( const NLMISC::CBitmap bmp  ) 
void NL3D::CHLSColorTexture::uncompressBlockRGB ( const uint8 srcDXTC,
CRGBA dstRGBA 
) [static, private]

uncompress DXTC5 RGB only block, into a RGBA raw array. Alpha is setup with undefined values

Definition at line 555 of file hls_color_texture.cpp.

References NLMISC::CRGBA::blendFromui(), NLMISC::n, and NLMISC::CRGBA::set565().

Referenced by buildColorVersion().


Member Data Documentation

Definition at line 124 of file hls_color_texture.h.

Referenced by addMask(), buildColorVersion(), serial(), and setBitmap().

Definition at line 123 of file hls_color_texture.h.

Referenced by addMask(), buildColorVersion(), reset(), serial(), and setBitmap().

std::vector<CMask> NL3D::CHLSColorTexture::_Masks [private]

Definition at line 128 of file hls_color_texture.h.

Referenced by addMask(), buildColorVersion(), getNumMasks(), reset(), and serial().

Definition at line 123 of file hls_color_texture.h.

Referenced by addMask(), buildColorVersion(), reset(), serial(), and setBitmap().

std::vector<uint8> NL3D::CHLSColorTexture::_Texture [private]

Definition at line 126 of file hls_color_texture.h.

Referenced by addMask(), buildColorVersion(), reset(), serial(), and setBitmap().

Definition at line 123 of file hls_color_texture.h.

Referenced by addMask(), buildColorVersion(), reset(), serial(), and setBitmap().


The documentation for this class was generated from the following files:

Generated on Thu Jan 7 08:30:04 2010 for NeL by  doxygen 1.6.1