CMSC23700 Common Code Library
Support code for CS23700 programming projects
|
#include <tqt.hpp>
Public Member Functions | |
TextureQTree (std::string const &filename, bool flip, bool sRGB) | |
constructor for a texture quad tree | |
~TextureQTree () | |
bool | isValid () const |
is this a valid TQT? | |
int | depth () const |
the depth of the TQT | |
int | tileSize () const |
the size of a texture tile measured in pixels (tiles are always square) | |
cs237::Image2D * | loadImage (int level, int row, int col) |
return the image tile at the specified quadtree node. | |
bool | sRGB () const |
are the images sRGB? | |
Static Public Member Functions | |
static bool | isTQTFile (std::string const &filename) |
return true if the file looks like a TQT file of the right version | |
Manages a disk-based texture-image quadtree and supports loading individual texture images at different levels and locations in the tree.
tqt::TextureQTree::TextureQTree | ( | std::string const & | filename, |
bool | flip, | ||
bool | sRGB | ||
) |
constructor for a texture quad tree
filename | |
flip | should the image be flipped to match OpenGL conventions |
sRGB | are the textures in sRGB format? |
tqt::TextureQTree::~TextureQTree | ( | ) |
|
inline |
the depth of the TQT
|
static |
return true if the file looks like a TQT file of the right version
|
inline |
is this a valid TQT?
cs237::Image2D * tqt::TextureQTree::loadImage | ( | int | level, |
int | row, | ||
int | col | ||
) |
return the image tile at the specified quadtree node.
[in] | level | the level of the node in the tree (root = 0) |
[in] | row | the row of the node on its level (north == 0) |
[in] | col | the column of the node on its level (west == 0) |
|
inline |
are the images sRGB?
|
inline |
the size of a texture tile measured in pixels (tiles are always square)