|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CHLSColorTexture Class ReferenceA colorisable texture.
More...
#include <hls_color_texture.h>
List of all members.
Public Methods |
| CHLSColorTexture () |
void | reset () |
| reset the build. More...
|
void | setBitmap (const NLMISC::CBitmap &bmp) |
| setup the un-colored bitmap for the texture. More...
|
void | addMask (const NLMISC::CBitmap &bmp, uint threshold=15) |
| add a mask to the texture. More...
|
uint | getNumMasks () const |
| get num of masks. More...
|
void | buildColorVersion (const CHLSColorDelta *colDeltaList, NLMISC::CBitmap &out) |
| build a texture with a HLS Color Delta. More...
|
void | serial (NLMISC::IStream &f) |
Static Private Methods |
void | uncompressBlockRGB (const uint8 *srcDXTC, CRGBA *dstRGBA) |
| uncompress DXTC5 RGB only block, into a RGBA raw array. Alpha is setup with undefined values. More...
|
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!! More...
|
void | computeMinMax (sint *diffBlock, CVectorInt &v, sint mean[3], sint rgb0[3], sint rgb1[3]) |
| used by compressBlockRGB(). More...
|
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 !!! More...
|
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 70 of file hls_color_texture.h.
Constructor & Destructor Documentation
NL3D::CHLSColorTexture::CHLSColorTexture |
( |
|
) |
|
|
Member Function Documentation
|
add a mask to the texture.
R is taken as the mask value. must be same size as in setBitmap() -
Parameters:
-
threshold |
used to know if a pixel mask value is or not an intermediate (ie not 0 or 255) |
Definition at line 152 of file hls_color_texture.cpp.
References _BlockToCompressIndex, _Height, _Masks, _NumMipMap, _Texture, _Width, BLOCK_ALPHA_SIZE, NLMISC::CBitmap::convertToType, id, MASK_BLOCK_EMPTY, MASK_BLOCK_FULL, MASK_BLOCK_MIXT, min, nlassert, src, w, x, and y. |
|
build a texture with a HLS Color Delta.
-
Parameters:
-
colDelta |
array of delta to apply to the bitmap (must be of numMasks entries) |
out |
a colorised bitmap with DXTC5/mipMaps generated |
Definition at line 337 of file hls_color_texture.cpp.
References _BlockToCompressIndex, _Height, _Masks, _NumMipMap, _Texture, _Width, BLOCK_DXTC_SIZE, BLOCK_NUM_PIXEL, colorizeDXTCBlockRGB, compressBlockRGB, NL3D::getBitPack, NLMISC::CBitmap::getPixels, min, nlassert, NLMISC::CBitmap::reset, NLMISC::CBitmap::resize, NLMISC::CBitmap::resizeMipMap, NLMISC::CBitmap::setMipMapCount, uncompressBlockRGB, and w. |
void NL3D::CHLSColorTexture::colorizeDXTCBlockRGB |
( |
const uint8 * |
srcPtr, |
|
|
uint8 * |
dstPtr, |
|
|
uint8 |
dHue, |
|
|
uint |
dLum, |
|
|
uint |
dSat |
|
) |
[static, private] |
|
void NL3D::CHLSColorTexture::compressBlockRGB |
( |
CRGBA * |
srcRGBA, |
|
|
uint8 * |
dstDXTC |
|
) |
[static, private] |
|
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] |
|
void NL3D::CHLSColorTexture::reset |
( |
|
) |
|
|
|
setup the un-colored bitmap for the texture.
-
Parameters:
-
bmp |
a bitmap which must be a DXTC5 with all mipmaps. |
Definition at line 92 of file hls_color_texture.cpp.
References _BlockToCompressIndex, _Height, _NumMipMap, _Texture, _Width, NLMISC::CBitmap::getHeight, NLMISC::CBitmap::getMipMapCount, NLMISC::CBitmap::getPixelFormat, NLMISC::CBitmap::getPixels, NLMISC::CBitmap::getWidth, height, nlassert, reset, and width. |
void NL3D::CHLSColorTexture::uncompressBlockRGB |
( |
const uint8 * |
srcDXTC, |
|
|
CRGBA * |
dstRGBA |
|
) |
[static, private] |
|
Member Data Documentation
uint32 NL3D::CHLSColorTexture::_BlockToCompressIndex [private]
|
|
uint32 NL3D::CHLSColorTexture::_Height [private]
|
|
std::vector<CMask> NL3D::CHLSColorTexture::_Masks [private]
|
|
uint32 NL3D::CHLSColorTexture::_NumMipMap [private]
|
|
std::vector<uint8> NL3D::CHLSColorTexture::_Texture [private]
|
|
uint32 NL3D::CHLSColorTexture::_Width [private]
|
|
The documentation for this class was generated from the following files:
|
|