Public Member Functions | |
| int | getWidth () const |
| returns texture width | |
| int | getHeight () const |
| returns texture height | |
| bool | isAlpha () const |
| true if texture is in RGBA format | |
| unsigned char * | getData () const |
| returns texture data (see isAlpha to test if the texture format is RGB or RGBA) | |
| const char * | getName () const |
| returns the name of the texture (filename in most cases) | |
| void | computeNormals (double scale=1.0, double norme=1.0) |
| Convert texture to a normal texture. | |
| void | convertToNormal (double scale=1.0, double norme=1.0) |
| Same as computeNormals. | |
| virtual void | convert2Alpha (unsigned char r, unsigned char g, unsigned char b, unsigned char tolerence) |
| Same as computeAlpha with alpha_color functor. | |
| virtual void | loadAlphaMap (CTexture *) |
| Load an alpha map from the red component of another CTexture. | |
| void | loadAlphaMap (const char *) |
| Load an alpha map from the red component of an image file. | |
| void | computeAlpha (const alpha_functor &af) |
| Compute alpha map from an alpha_functor (see alpha_zero and alpha_one). | |
| CTexture * | computeNextMIPMapLevel (const mipmap_functor &mip) const |
| Compute next MIP-map level map from a mipmap_functor. | |
| CTexture * | convolve (CTexture *kernel) const |
| Convolves the texture by the kernel. | |
| void | copy (int x, int y, const CTexture *tex, const copy_functor &cpy=copy_std()) |
| Copy texture tex at coords x,y. | |
| void | convert (const convert_functor &cnv=convert_std()) |
| Convert a texture. | |
| CTexture * | difference (const CTexture *) |
| Compute difference with texture. | |
| CTexture * | extract (int x, int y, int w, int h) |
| Extracts a part of a texture as a new texture (with a copy of the data). | |
| int | memsize () const |
| Returns the size of texture data in memory. | |
| void | flipY () |
| Apply an horizontal flip. | |
| void | flipX () |
| Apply a vertical flip. | |
| void | setDataOwner (bool b) |
| Tell if the instance should erase its RGB(A) data when deleted. | |
| unsigned char | get (int i, int j, int c) const |
| Retrieve color component. | |
| unsigned char & | set (int i, int j, int c) |
| Access color component. | |
| unsigned char | getmod (int i, int j, int c) const |
| Retrieve color component (modulo). | |
| unsigned char | getclp (int i, int j, int c) const |
| Retrieve color component (clamp). | |
| unsigned char | getlin (double i, double j, int c) const |
| Retrieve color component (linear interpolation). | |
| unsigned char | tex2D (double i, double j, int c) const |
| Retrieve color component (linear interpolation), access in normalized texture space. | |
Static Public Member Functions | |
| CTexture * | loadTexture (const char *) |
| Load a CTexture from an image file. | |
| void | saveTexture (const CTexture *, const char *) |
| Save a CTexture to an image file. | |
|
|
Compute next MIP-map level map from a mipmap_functor. Works only on textures with width and height that are power of 2. |
|
||||||||||||
|
Convert texture to a normal texture. Luminance is used as an height field to compute normals by finite differencing. The scale factor applies to the height map. |
|
||||||||||||||||||||
|
Same as computeAlpha with alpha_color functor. Deprecated. |
|
||||||||||||
|
Same as computeNormals. Deprecated. |
|
|
Convolves the texture by the kernel. A new texture is created |
|
||||||||||||||||||||
|
Copy texture tex at coords x,y. If the texture goes outside of borders, it is clipped. |
|
|
Load a CTexture from an image file. The format is automaticaly deduced from extension. |
|
||||||||||||
|
Save a CTexture to an image file. The format is automaticaly deduced from extension. |
1.3.5