#include <material.h>
This class describes a 2D array of texture tiles.
It is very fast to access a tile given a U and V coordinate in that tile (each tile covers exactly a 1.0 x 1.0 area in UV coordinates, and starts on a whole number) This is used by both the TexturePool class and the CGMaterial class.
Definition at line 354 of file material.h.
Public Member Functions | |
TextureTileArray () | |
~TextureTileArray () | |
float | getMinU () const |
returns the minimum U coordinate. More... | |
float | getMinV () const |
returns the minimum V coordinate. More... | |
float | getMaxU () const |
returns the maximum U coordinate. More... | |
float | getMaxV () const |
returns the maximum V coordinate. More... | |
void | getTotalUVBounds (float &minU, float &minV, float &maxU, float &maxV) const |
get the bounds of this texture tile array More... | |
bool | contains (float U, float V) const |
returns true if the array is big enough to contain the specified UV coordinates More... | |
int | getTileStateIndex (float U, float V) const |
void | setTileStateIndex (float U, float V, int indx) |
void | dropAll () |
deallocate all textures and clears their states. More... | |
void | clearTileStateIndices () |
|
inline |
Definition at line 395 of file material.h.
|
inline |
Definition at line 396 of file material.h.
|
inline |
returns the minimum U coordinate.
Will have all 0 to the right of the decimal
Definition at line 400 of file material.h.
|
inline |
returns the minimum V coordinate.
Will have all 0 to the right of the decimal
Definition at line 403 of file material.h.
|
inline |
returns the maximum U coordinate.
Will have all 0 to the right of the decimal
Definition at line 406 of file material.h.
|
inline |
returns the maximum V coordinate.
Will have all 0 to the right of the decimal
Definition at line 409 of file material.h.
|
inline |
get the bounds of this texture tile array
Definition at line 412 of file material.h.
|
inline |
returns true if the array is big enough to contain the specified UV coordinates
Definition at line 422 of file material.h.
|
inline |
Definition at line 428 of file material.h.
Definition at line 434 of file material.h.
void dropAll | ( | ) |
deallocate all textures and clears their states.
Also deallocates the entire TextureTile array and sets the bounds to 0. (which means don't call getLive, getInactiveColor, or getProxyLevel after calling this without first allocating those textures first.
void clearTileStateIndices | ( | ) |